signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class StreamBlockQueue { /** * Only allow two blocks in memory , put the rest in the persistent deque */
public void offer ( StreamBlock streamBlock ) throws IOException { } } | m_persistentDeque . offer ( streamBlock . asBBContainer ( ) ) ; long unreleasedSeqNo = streamBlock . unreleasedSequenceNumber ( ) ; if ( m_memoryDeque . size ( ) < 2 ) { StreamBlock fromPBD = pollPersistentDeque ( false ) ; if ( ( streamBlock . startSequenceNumber ( ) == fromPBD . startSequenceNumber ( ) ) && ( unrelea... |
public class OutHamp { /** * Sends a stream message to a given address */
public void stream ( OutputStream os , HeadersAmp headers , String from , long qId , String address , String methodName , PodRef podCaller , ResultStream < ? > result , Object [ ] args ) throws IOException { } } | init ( os ) ; OutH3 out = _out ; if ( out == null ) { return ; } if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "hamp-stream-w " + methodName + ( args != null ? Arrays . asList ( args ) : "[]" ) + " {to:" + address + ", from:" + from + "}" ) ; } out . writeLong ( MessageTypeHamp . STREAM . ordinal ( ) ) ; ... |
public class GroupBy { /** * Creates and chain a Having object for filtering the aggregated values
* from the the GROUP BY clause .
* @ param expression The expression
* @ return The Having object that represents the HAVING clause of the query . */
@ NonNull @ Override public Having having ( @ NonNull Expression ... | if ( expression == null ) { throw new IllegalArgumentException ( "expression cannot be null." ) ; } return new Having ( this , expression ) ; |
public class KillmailsApi { /** * Get a single killmail ( asynchronously ) Return a single killmail from its
* ID and hash - - - This route is cached for up to 1209600 seconds
* @ param killmailHash
* The killmail hash for verification ( required )
* @ param killmailId
* The killmail ID to be queried ( requir... | com . squareup . okhttp . Call call = getKillmailsKillmailIdKillmailHashValidateBeforeCall ( killmailHash , killmailId , datasource , ifNoneMatch , callback ) ; Type localVarReturnType = new TypeToken < KillmailResponse > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnType , callback ) ; return... |
public class EmvParser { /** * Method used to create GPO command and execute it
* @ param pPdol
* PDOL raw data
* @ return return data
* @ throws CommunicationException communication error */
protected byte [ ] getGetProcessingOptions ( final byte [ ] pPdol ) throws CommunicationException { } } | // List Tag and length from PDOL
List < TagAndLength > list = TlvUtil . parseTagAndLength ( pPdol ) ; ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; try { out . write ( EmvTags . COMMAND_TEMPLATE . getTagBytes ( ) ) ; // COMMAND
// TEMPLATE
out . write ( TlvUtil . getLength ( list ) ) ; // ADD total length... |
public class CommerceNotificationTemplatePersistenceImpl { /** * Returns the commerce notification template where uuid = & # 63 ; and groupId = & # 63 ; or throws a { @ link NoSuchNotificationTemplateException } if it could not be found .
* @ param uuid the uuid
* @ param groupId the group ID
* @ return the match... | CommerceNotificationTemplate commerceNotificationTemplate = fetchByUUID_G ( uuid , groupId ) ; if ( commerceNotificationTemplate == null ) { StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; msg . append ( uuid ) ; msg . append ( ", groupId=" ) ; msg . ... |
public class Symbol { /** * An accessor method for the type attributes of this symbol .
* Attributes of class symbols should be accessed through the accessor
* method to make sure that the class symbol is loaded . */
public List < Attribute . TypeCompound > getRawTypeAttributes ( ) { } } | return ( metadata == null ) ? List . < Attribute . TypeCompound > nil ( ) : metadata . getTypeAttributes ( ) ; |
public class GrahamScanConvexHull2D { /** * Add a single point to the list ( this does not compute the hull ! )
* @ param point Point to add */
public void add ( double ... point ) { } } | if ( this . ok ) { this . points = new ArrayList < > ( this . points ) ; this . ok = false ; } this . points . add ( point ) ; // Update data set extends
minmaxX . put ( point [ 0 ] ) ; minmaxY . put ( point [ 1 ] ) ; |
public class ExecutorFilter { /** * Create an OrderedThreadPool executor .
* @ param corePoolSize The initial pool sizePoolSize
* @ param maximumPoolSize The maximum pool size
* @ param keepAliveTime Default duration for a thread
* @ param unit Time unit used for the keepAlive value
* @ param threadFactory Th... | // Create a new Executor
Executor executor = new OrderedThreadPoolExecutor ( corePoolSize , maximumPoolSize , keepAliveTime , unit , threadFactory , queueHandler ) ; return executor ; |
public class PropertiesUtil { /** * Returns the Properties formatted as a String
* @ param props properties
* @ return String format from the Properties
* @ throws java . io . IOException if an error occurs */
public static String stringFromProperties ( Properties props ) throws IOException { } } | ByteArrayOutputStream baos = new ByteArrayOutputStream ( 2048 ) ; props . store ( baos , null ) ; String propsString ; propsString = URLEncoder . encode ( baos . toString ( "ISO-8859-1" ) , "ISO-8859-1" ) ; return propsString ; |
public class DefaultPrefixConfig { /** * Gets the iterator .
* @ return the iterator */
private Iterator < String > getIterator ( ) { } } | final Set < String > copy = getPrefixes ( ) ; final Iterator < String > copyIt = copy . iterator ( ) ; return new Iterator < String > ( ) { private String lastOne = null ; @ Override public boolean hasNext ( ) { return copyIt . hasNext ( ) ; } @ Override public String next ( ) { if ( copyIt . hasNext ( ) ) { lastOne = ... |
public class CmsShellCommands { /** * Checks whether the given user already exists . < p >
* @ param name the user name
* @ return < code > true < / code > if the given user already exists */
private boolean existsUser ( String name ) { } } | CmsUser user = null ; try { user = m_cms . readUser ( name ) ; } catch ( CmsException e ) { // this will happen , if the user does not exist
} return user != null ; |
public class ManagementModule { /** * Get an < code > Array < / code > of < code > AbstractInvocationHandler < / code > s . The
* ordering is ascending alphabetical , determined by the module parameter
* names that begin with the string " decorator " , e . g . " decorator1 " ,
* " decorator2 " .
* @ return An a... | List < String > pNames = new ArrayList < String > ( ) ; Iterator < String > it = parameterNames ( ) ; String param ; while ( it . hasNext ( ) ) { param = it . next ( ) ; if ( param . startsWith ( "decorator" ) ) { pNames . add ( param ) ; } } Collections . sort ( pNames ) ; AbstractInvocationHandler [ ] invocationHandl... |
public class FnJodaToString { /** * It converts the input { @ link BaseDateTime } into a { @ link String } by means of the given pattern or style
* ( depending on the value of formatType parameter ) .
* @ param formatType the format { @ link FormatType }
* @ param format string with the format used for the output... | return FnJodaString . baseDateTimeToStr ( FnJodaString . FormatType . valueOf ( formatType . name ( ) ) , format , locale ) ; |
public class TeaServletAdmin { /** * Provides an ordered array of available templates using a
* handy wrapper class . */
@ SuppressWarnings ( "unchecked" ) public TemplateWrapper [ ] getKnownTemplates ( ) { } } | if ( mTemplateOrdering == null ) { setTemplateOrdering ( "name" ) ; } Comparator < TemplateWrapper > comparator = BeanComparator . forClass ( TemplateWrapper . class ) . orderBy ( "name" ) ; Set < TemplateWrapper > known = new TreeSet < TemplateWrapper > ( comparator ) ; TemplateLoader . Template [ ] loaded = mTeaServl... |
public class Util { /** * Checks just the flags field of the preamble . Allowed flags are Read Only , Empty , Compact , and
* ordered .
* @ param flags the flags field */
static void checkHeapFlags ( final int flags ) { } } | // only used by checkPreLongsFlagsCap and test
final int allowedFlags = READ_ONLY_FLAG_MASK | EMPTY_FLAG_MASK | COMPACT_FLAG_MASK | ORDERED_FLAG_MASK ; final int flagsMask = ~ allowedFlags ; if ( ( flags & flagsMask ) > 0 ) { throw new SketchesArgumentException ( "Possible corruption: Invalid flags field: " + Integer .... |
public class PrimitiveUtils { /** * Read float .
* @ param value the value
* @ param defaultValue the default value
* @ return the float */
public static Float readFloat ( String value , Float defaultValue ) { } } | if ( ! StringUtils . hasText ( value ) ) return defaultValue ; return Float . valueOf ( value ) ; |
public class NetworkEndpointGroupClient { /** * Lists the network endpoints in the specified network endpoint group .
* < p > Sample code :
* < pre > < code >
* try ( NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient . create ( ) ) {
* ProjectZoneNetworkEndpointGroupName network... | ListNetworkEndpointsNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointsNetworkEndpointGroupsHttpRequest . newBuilder ( ) . setNetworkEndpointGroup ( networkEndpointGroup ) . setNetworkEndpointGroupsListEndpointsRequestResource ( networkEndpointGroupsListEndpointsRequestResource ) . build ( ) ; return listNe... |
public class BucketIamSnippets { /** * Example of adding a member to the Bucket - level IAM */
public Policy addBucketIamMember ( String bucketName , Role role , Identity identity ) { } } | // [ START add _ bucket _ iam _ member ]
// Initialize a Cloud Storage client
Storage storage = StorageOptions . getDefaultInstance ( ) . getService ( ) ; // Get IAM Policy for a bucket
Policy policy = storage . getIamPolicy ( bucketName ) ; // Add identity to Bucket - level IAM role
Policy updatedPolicy = storage . se... |
public class PlaceholderSupport { /** * Adds placeholder support to a { @ link DifferenceEngineConfigurer } .
* @ param configurer the configurer to add support to
* @ param placeholderOpeningDelimiterRegex regular expression for
* the opening delimiter of placeholder , defaults to { @ link
* PlaceholderDiffere... | return configurer . withDifferenceEvaluator ( new PlaceholderDifferenceEvaluator ( placeholderOpeningDelimiterRegex , placeholderClosingDelimiterRegex ) ) ; |
public class LoopBarView { /** * Sets new gravity for selector
* @ param selectionGravity int value of gravity . Must be one of { @ link GravityAttr } */
public final void setGravity ( @ GravityAttr int selectionGravity ) { } } | mOrientationState . setSelectionGravity ( selectionGravity ) ; // note that mFlContainerSelected should be in FrameLayout
FrameLayout . LayoutParams params = ( LayoutParams ) mFlContainerSelected . getLayoutParams ( ) ; params . gravity = mOrientationState . getSelectionGravity ( ) ; mOrientationState . setSelectionMar... |
public class JCalendarDualField { /** * Set this component ' s name .
* Make sure the text component has the same name .
* @ param name The name to set . */
public void setName ( String name ) { } } | super . setName ( name ) ; m_tf . setName ( name ) ; if ( m_button != null ) m_button . setName ( name ) ; if ( m_buttonTime != null ) m_buttonTime . setName ( name ) ; |
public class UtilOptimize { /** * Iterate until the line search converges or the maximum number of iterations has been exceeded .
* The maximum number of steps is specified . A step is defined as the number of times the
* optimization parameters are changed .
* @ param search Search algorithm
* @ param maxSteps... | for ( int i = 0 ; i < maxSteps ; i ++ ) { boolean converged = step ( search ) ; if ( converged ) { return search . isConverged ( ) ; } } return true ; |
public class IO { /** * Copy Stream in to Stream out until EOF or exception .
* in own thread */
public static void copyThread ( InputStream in , OutputStream out ) { } } | try { instance ( ) . run ( new Job ( in , out ) ) ; } catch ( InterruptedException e ) { log . warn ( LogSupport . EXCEPTION , e ) ; } |
public class CmsJspImageBean { /** * Returns the image height percentage relative to the image width as a String . < p >
* In case a ratio has been used to scale the image , the height percentage is
* calculated based on the ratio , not on the actual image pixel size .
* This is done to avoid rounding differences... | if ( m_ratioHeightPercentage == null ) { m_ratioHeightPercentage = calcRatioHeightPercentage ( getScaler ( ) . getWidth ( ) , getScaler ( ) . getHeight ( ) ) ; } return m_ratioHeightPercentage ; |
public class OrmLiteDefaultContentProvider { /** * This method is called after the onUpdate processing has been handled . If you ' re a need ,
* you can override this method .
* @ param result
* This is the return value of onUpdate method .
* @ param uri
* This is the Uri of target .
* @ param target
* Th... | this . getContext ( ) . getContentResolver ( ) . notifyChange ( uri , null ) ; |
public class CmsBasicFormField { /** * Utility method for creating a basic form field . < p >
* @ param propertyConfig the property configuration
* @ param additionalParams the additional parameters
* @ return the newly created form fields */
public static CmsBasicFormField createField ( CmsXmlContentProperty pro... | return createField ( propertyConfig , propertyConfig . getName ( ) , CmsWidgetFactoryRegistry . instance ( ) , additionalParams , false ) ; |
public class PersistTachyon { /** * Split key name composed of tachyon : / / < client - uri > / filename into two parts :
* - client - uri without tachyon : / / prefix
* - filename
* And returns both components . */
private static String [ ] decodeKey ( Key k ) { } } | String s = new String ( ( k . isChunkKey ( ) ) ? Arrays . copyOfRange ( k . _kb , Vec . KEY_PREFIX_LEN , k . _kb . length ) : k . _kb ) ; return decode ( s ) ; |
public class RegexValidator { /** * Validate a value against the set of regular expressions .
* @ param value The value to validate .
* @ return < code > true < / code > if the value is valid otherwise < code > false < / code > . */
public boolean isValid ( String value ) { } } | if ( value == null ) { return false ; } for ( int i = 0 ; i < patterns . length ; i ++ ) { if ( patterns [ i ] . matcher ( value ) . matches ( ) ) { return true ; } } return false ; |
public class LruWindowTinyLfuPolicy { /** * Returns all variations of this policy based on the configuration parameters . */
public static Set < Policy > policies ( Config config ) { } } | LruWindowTinyLfuSettings settings = new LruWindowTinyLfuSettings ( config ) ; return settings . percentMain ( ) . stream ( ) . map ( percentMain -> new LruWindowTinyLfuPolicy ( percentMain , settings ) ) . collect ( toSet ( ) ) ; |
public class JMElasticsearchBulk { /** * Send with bulk processor and object mapper .
* @ param object the object
* @ param index the index
* @ param type the type */
public void sendWithBulkProcessorAndObjectMapper ( Object object , String index , String type ) { } } | sendWithBulkProcessorAndObjectMapper ( object , index , type , null ) ; |
public class BlocksMap { /** * counts number of containing nodes . Better than using iterator . */
int numNodes ( Block b ) { } } | BlockInfo info = blocks . get ( b ) ; return info == null ? 0 : info . numNodes ( ) ; |
public class EbsConfiguration { /** * An array of Amazon EBS volume specifications attached to a cluster instance .
* @ return An array of Amazon EBS volume specifications attached to a cluster instance . */
public java . util . List < EbsBlockDeviceConfig > getEbsBlockDeviceConfigs ( ) { } } | if ( ebsBlockDeviceConfigs == null ) { ebsBlockDeviceConfigs = new com . amazonaws . internal . SdkInternalList < EbsBlockDeviceConfig > ( ) ; } return ebsBlockDeviceConfigs ; |
public class FirewallPolicyService { /** * Update firewall policy
* @ param firewallPolicy firewall policy
* @ param config firewall policy config
* @ return OperationFuture wrapper for firewall policy */
public OperationFuture < FirewallPolicy > update ( FirewallPolicy firewallPolicy , FirewallPolicyConfig confi... | FirewallPolicyMetadata metadata = findByRef ( firewallPolicy ) ; firewallPolicyClient . update ( metadata . getDataCenterId ( ) , metadata . getId ( ) , composeFirewallPolicyRequest ( config ) ) ; return new OperationFuture < > ( firewallPolicy , new NoWaitingJobFuture ( ) ) ; |
public class UriEscape { /** * Perform am URI path segment < strong > unescape < / strong > operation
* on a < tt > Reader < / tt > input using < tt > UTF - 8 < / tt > as encoding , writing results to a < tt > Writer < / tt > .
* This method will unescape every percent - encoded ( < tt > % HH < / tt > ) sequences p... | unescapeUriPathSegment ( reader , writer , DEFAULT_ENCODING ) ; |
public class XMLOutputter { /** * Checks all invariants . This check should be performed at the end of
* every method that changes the internal state of this object .
* @ throws Error if the state of this < code > XMLOutputter < / code > is invalid . */
private final void checkInvariants ( ) throws Error { } } | if ( _lineBreak == null ) { throw new Error ( "_lineBreak == null" ) ; } else if ( _lineBreak == LineBreak . NONE && _indentation . length ( ) > 0 ) { throw new Error ( "_lineBreak == LineBreak.NONE && _indentation = \"" + _indentation + "\"." ) ; } else if ( _elementStack == null ) { throw new Error ( "_elementStack (... |
public class CellTypeProteinConcentration { /** * getter for celltype - gets
* @ generated
* @ return value of the feature */
public CellType getCelltype ( ) { } } | if ( CellTypeProteinConcentration_Type . featOkTst && ( ( CellTypeProteinConcentration_Type ) jcasType ) . casFeat_celltype == null ) jcasType . jcas . throwFeatMissing ( "celltype" , "ch.epfl.bbp.uima.types.CellTypeProteinConcentration" ) ; return ( CellType ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas .... |
public class ListConfigurationSetsResult { /** * A list of configuration sets .
* @ param configurationSets
* A list of configuration sets . */
public void setConfigurationSets ( java . util . Collection < ConfigurationSet > configurationSets ) { } } | if ( configurationSets == null ) { this . configurationSets = null ; return ; } this . configurationSets = new com . amazonaws . internal . SdkInternalList < ConfigurationSet > ( configurationSets ) ; |
public class DefaultParameterEquivalencer { /** * Obtain the destinationNamespace equivalent value of sourceValue in sourceNamespace
* @ param sourceNamespace resourceLocation of source namespace
* @ param destinationNamespace resourceLocation of destination namespace
* @ param sourceValue
* @ return equivalent... | JDBMEquivalenceLookup sourceLookup = openEquivalences . get ( sourceNamespace ) ; if ( sourceLookup == null ) { return null ; } final SkinnyUUID sourceUUID = sourceLookup . lookup ( sourceValue ) ; if ( sourceUUID == null ) { return null ; } return doFindEquivalence ( destinationNamespace , sourceUUID ) ; |
public class DE9IMRelation { /** * Check if the spatial relation between two { @ link GeometricShapeVariable } s is of a given type .
* @ param gv1 The source { @ link GeometricShapeVariable } .
* @ param gv2 The destination { @ link GeometricShapeVariable } .
* @ param t The type of relation to check .
* @ ret... | try { String methodName = t . name ( ) . substring ( 0 , 1 ) . toLowerCase ( ) + t . name ( ) . substring ( 1 ) ; Method m = Geometry . class . getMethod ( methodName , Geometry . class ) ; Geometry g1 = ( ( GeometricShapeDomain ) gv1 . getDomain ( ) ) . getGeometry ( ) ; Geometry g2 = ( ( GeometricShapeDomain ) gv2 . ... |
public class PathService { /** * Creates a hash code for the given path . */
public int hash ( JimfsPath path ) { } } | int hash = 31 ; hash = 31 * hash + getFileSystem ( ) . hashCode ( ) ; final Name root = path . root ( ) ; final ImmutableList < Name > names = path . names ( ) ; if ( equalityUsesCanonicalForm ) { // use hash codes of names themselves , which are based on the canonical form
hash = 31 * hash + ( root == null ? 0 : root ... |
public class TreeNavigationView { /** * create navigation in a recursive way .
* @ param pitem the item to add new items
* @ param plist the list of the navigation entries
* @ param pactiveEntry the active entry */
public void createRecursiveNavigation ( final TreeItem pitem , final List < NavigationEntryInterfac... | for ( final NavigationEntryInterface navEntry : plist ) { final TreeItem newItem ; if ( navEntry instanceof NavigationEntryFolder ) { newItem = new TreeItem ( navEntry . getMenuValue ( ) ) ; createRecursiveNavigation ( newItem , ( ( NavigationEntryFolder ) navEntry ) . getSubEntries ( ) , pactiveEntry ) ; newItem . set... |
public class Fn { /** * Synchronized { @ code Predicate }
* @ param mutex to synchronized on
* @ param predicate
* @ return */
@ Beta public static < T > Predicate < T > sp ( final Object mutex , final Predicate < T > predicate ) { } } | N . checkArgNotNull ( mutex , "mutex" ) ; N . checkArgNotNull ( predicate , "predicate" ) ; return new Predicate < T > ( ) { @ Override public boolean test ( T t ) { synchronized ( mutex ) { return predicate . test ( t ) ; } } } ; |
public class BooleanFormula { /** * / * ( non - Javadoc )
* @ see java . util . Set # removeAll ( java . util . Collection ) */
@ Override public boolean removeAll ( Collection < ? > collection ) { } } | if ( booleanTerms == null ) { return false ; } return booleanTerms . removeAll ( collection ) ; |
public class WhereClauseParser { /** * Parse where .
* @ param shardingRule databases and tables sharding rule
* @ param sqlStatement SQL statement
* @ param items select items */
public void parse ( final ShardingRule shardingRule , final SQLStatement sqlStatement , final List < SelectItem > items ) { } } | aliasExpressionParser . parseTableAlias ( ) ; if ( lexerEngine . skipIfEqual ( DefaultKeyword . WHERE ) ) { parseWhere ( shardingRule , sqlStatement , items ) ; } |
public class XsdEmitter { /** * Create an XML Schema element from a COBOL data item .
* @ param xsdDataItem COBOL data item decorated with XSD attributes
* @ return the XML schema element */
public XmlSchemaElement createXmlSchemaElement ( final XsdDataItem xsdDataItem ) { } } | // Let call add root elements if he needs to so for now pretend this is
// not a root element
XmlSchemaElement element = new XmlSchemaElement ( getXsd ( ) , false ) ; element . setName ( xsdDataItem . getXsdElementName ( ) ) ; if ( xsdDataItem . getMaxOccurs ( ) != 1 ) { element . setMaxOccurs ( xsdDataItem . getMaxOcc... |
public class XMLParser { /** * Returns true once { @ code limit - position > = minimum } . If the data is
* exhausted before that many characters are available , this returns false .
* @ param minimum the minimum
* @ return true , if successful
* @ throws IOException Signals that an I / O exception has occurred... | // If we ' ve exhausted the current content source , remove it
while ( nextContentSource != null ) { if ( position < limit ) { throw new KriptonRuntimeException ( "Unbalanced entity!" , true , this . getLineNumber ( ) , this . getColumnNumber ( ) , getPositionDescription ( ) , null ) ; } popContentSource ( ) ; if ( lim... |
public class Smushing { /** * Workouts the amount of characters that can be smushed across all lines .
* @ param figletFont Font definition
* @ param char1 Message so far
* @ param char2 Char to be added
* @ return Maximum overlay across all lines */
@ SuppressWarnings ( "StatementWithEmptyBody" ) private stati... | if ( figletFont . smushingRulesToApply . getHorizontalLayout ( ) == SmushingRule . Layout . FULL_WIDTH ) { return 0 ; } int maxPotentialOverlay = figletFont . maxLine ; for ( int l = 0 ; l < figletFont . height ; l ++ ) { if ( char1 [ l ] == null ) { char1 [ l ] = new char [ 0 ] ; } char [ ] c1 = char1 [ l ] ; char [ ]... |
public class WebSiteManagementClientImpl { /** * Gets a list of meters for a given location .
* Gets a list of meters for a given location .
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail the validation ... | return AzureServiceFuture . fromPageResponse ( listBillingMetersSinglePageAsync ( ) , new Func1 < String , Observable < ServiceResponse < Page < BillingMeterInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < BillingMeterInner > > > call ( String nextPageLink ) { return listBillingMetersNextSing... |
public class BufferUtil { /** * Allocate a buffer and fill it from a channel . The returned
* buffer will be rewound to the begining .
* @ return Buffer containing size bytes from the channel .
* @ throws IOException if the channel read does .
* @ throws EOFException if a end of stream is encountered
* before... | ByteBuffer buf = ByteBuffer . allocate ( size ) ; int justRead ; int totalRead = 0 ; // FIXME , this will be a tight loop if the channel is non - blocking . . .
while ( totalRead < size ) { logger . debug ( "reading totalRead={}" , totalRead ) ; if ( ( justRead = channel . read ( buf ) ) < 0 ) throw new EOFException ( ... |
public class Stream { /** * Filters out fields from a stream , resulting in a Stream containing only the fields specified by ` keepFields ` .
* For example , if you had a Stream ` mystream ` containing the fields ` [ " a " , " b " , " c " , " d " ] ` , calling "
* ` ` ` java
* mystream . project ( new Fields ( " ... | projectionValidation ( keepFields ) ; return _topology . addSourcedNode ( this , new ProcessorNode ( _topology . getUniqueStreamId ( ) , _name , keepFields , new Fields ( ) , new ProjectedProcessor ( keepFields ) ) ) ; |
public class CompareHelper { /** * Compare the passed items and handle < code > null < / code > values correctly . A
* < code > null < / code > value is always smaller than a non - < code > null < / code >
* value .
* @ param < DATATYPE >
* Any object to be used . Both need to be of the same type .
* @ param ... | if ( EqualsHelper . identityEqual ( aObj1 , aObj2 ) ) return 0 ; if ( aObj1 == null ) return bNullValuesComeFirst ? - 1 : + 1 ; if ( aObj2 == null ) return bNullValuesComeFirst ? + 1 : - 1 ; return aComp . compare ( aObj1 , aObj2 ) ; |
public class AsymmetricCipher { /** * 非对称加密构造器
* @ param privateKey PKCS8格式的私钥 ( BASE64 encode过的 )
* @ param publicKey X509格式的公钥 ( BASE64 encode过的 )
* @ return AsymmetricCipher */
public static CipherUtil buildInstance ( byte [ ] privateKey , byte [ ] publicKey ) { } } | PrivateKey priKey = KeyTools . getPrivateKeyFromPKCS8 ( Algorithms . RSA . name ( ) , new ByteArrayInputStream ( privateKey ) ) ; PublicKey pubKey = KeyTools . getPublicKeyFromX509 ( Algorithms . RSA . name ( ) , new ByteArrayInputStream ( publicKey ) ) ; return buildInstance ( priKey , pubKey ) ; |
public class AFPTwister { /** * orig name : transPdb */
private static void transformOrigPDB ( int n , int [ ] res1 , int [ ] res2 , Atom [ ] ca1 , Atom [ ] ca2 , AFPChain afpChain , int blockNr ) throws StructureException { } } | logger . debug ( "transforming original coordinates {} len1: {} res1: {} len2: {} res2: {}" , n , ca1 . length , res1 . length , ca2 . length , res2 . length ) ; Atom [ ] cod1 = getAtoms ( ca1 , res1 , n , false ) ; Atom [ ] cod2 = getAtoms ( ca2 , res2 , n , false ) ; // double * cod1 = pro1 - > Cod4Res ( n , res1 ) ;... |
public class JobTargetExecutionsInner { /** * Lists the target executions of a job step execution .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param serverName The name of the server .
* ... | return listByStepSinglePageAsync ( resourceGroupName , serverName , jobAgentName , jobName , jobExecutionId , stepName ) . concatMap ( new Func1 < ServiceResponse < Page < JobExecutionInner > > , Observable < ServiceResponse < Page < JobExecutionInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page ... |
public class StoredPaymentChannelServerStates { /** * < p > Puts the given channel in the channels map and automatically closes it 2 hours before its refund transaction
* becomes spendable . < / p >
* < p > Because there must be only one , canonical { @ link StoredServerChannel } per channel , this method throws if... | lock . lock ( ) ; try { checkArgument ( mapChannels . put ( channel . contract . getTxId ( ) , checkNotNull ( channel ) ) == null ) ; // Add the difference between real time and Utils . now ( ) so that test - cases can use a mock clock .
Date autocloseTime = new Date ( ( channel . refundTransactionUnlockTimeSecs + CHAN... |
public class SetVaultAccessPolicyRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( SetVaultAccessPolicyRequest setVaultAccessPolicyRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( setVaultAccessPolicyRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( setVaultAccessPolicyRequest . getAccountId ( ) , ACCOUNTID_BINDING ) ; protocolMarshaller . marshall ( setVaultAccessPolicyRequest . getVaultName ( ) , VAULT... |
public class EscapedFunctions2 { /** * month translation
* @ param buf The buffer to append into
* @ param parsedArgs arguments
* @ throws SQLException if something wrong happens */
public static void sqlmonth ( StringBuilder buf , List < ? extends CharSequence > parsedArgs ) throws SQLException { } } | singleArgumentFunctionCall ( buf , "extract(month from " , "month" , parsedArgs ) ; |
public class IOUtil { /** * Converts a resource into a temporary file that can be read by objects
* that look up files by name . Returns the file that was created . The file
* will be deleted when the program exits .
* @ param resourceName the resource to convert . Cannot be < code > null < / code > .
* @ param... | BufferedReader reader = new BufferedReader ( new InputStreamReader ( getResourceAsStream ( resourceName ) ) ) ; File outFile = File . createTempFile ( filePrefix , fileSuffix ) ; BufferedWriter writer = new BufferedWriter ( new OutputStreamWriter ( new FileOutputStream ( outFile ) ) ) ; int c ; while ( ( c = reader . r... |
public class TemplateEngines { /** * This method is used to search for a specific class , telling if loading the engine would succeed . This is
* typically used to avoid loading optional modules .
* @ param config the configuration
* @ param db database instance
* @ param engineClassName engine class , used bot... | try { @ SuppressWarnings ( "unchecked" ) Class < ? extends AbstractTemplateEngine > engineClass = ( Class < ? extends AbstractTemplateEngine > ) Class . forName ( engineClassName , false , TemplateEngines . class . getClassLoader ( ) ) ; Constructor < ? extends AbstractTemplateEngine > ctor = engineClass . getConstruct... |
public class SqlTransientExceptionDetector { /** * Determines if the SQL exception a duplicate value in unique index .
* @ param se the exception
* @ return true if it is a code 23505 , otherwise false */
public static boolean isSqlStateDuplicateValueInUniqueIndex ( SQLException se ) { } } | String sqlState = se . getSQLState ( ) ; return sqlState != null && ( sqlState . equals ( "23505" ) || se . getMessage ( ) . contains ( "duplicate value in unique index" ) ) ; |
public class TransformXMLInterceptor { /** * Override preparePaint in order to perform processing specific to this interceptor .
* @ param request the request being responded to . */
@ Override public void preparePaint ( final Request request ) { } } | if ( doTransform && request instanceof ServletRequest ) { HttpServletRequest httpServletRequest = ( ( ServletRequest ) request ) . getBackingRequest ( ) ; String userAgentString = httpServletRequest . getHeader ( "User-Agent" ) ; /* It is possible to opt out on a case by case basis by setting a flag on the ua string . ... |
public class TransformCliProcessor { /** * Process the transform sub command
* @ param ns Namespace which contains parsed commandline arguments
* @ return true if the transform is successful , false if an error occured */
@ Override public boolean process ( Namespace ns ) { } } | Chainr chainr ; try { chainr = ChainrFactory . fromFile ( ( File ) ns . get ( "spec" ) ) ; } catch ( Exception e ) { JoltCliUtilities . printToStandardOut ( "Chainr failed to load spec file." , SUPPRESS_OUTPUT ) ; e . printStackTrace ( System . out ) ; return false ; } File file = ns . get ( "input" ) ; Object input = ... |
public class AbstractCommand { /** * Add a number of { @ link CommandFaceDescriptor } s to this Command .
* @ param faceDescriptors a { @ link Map } which contains & lt ; faceDescriptorId ,
* CommandFaceDescriptor & gt ; pairs . */
public void setFaceDescriptors ( Map faceDescriptors ) { } } | Assert . notNull ( faceDescriptors ) ; Iterator it = faceDescriptors . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry entry = ( Map . Entry ) it . next ( ) ; String faceDescriptorId = ( String ) entry . getKey ( ) ; CommandFaceDescriptor faceDescriptor = ( CommandFaceDescriptor ) entry . getValu... |
public class ChannelUpgradeHandler { /** * Add a protocol to this handler .
* @ param productString the product string to match
* @ param openListener the open listener to call */
public void addProtocol ( String productString , ChannelListener < ? super StreamConnection > openListener ) { } } | addProtocol ( productString , openListener , null ) ; |
public class ManyQuery { /** * Execute the query asynchronously
* @ param lm
* The loader manager to use for loading the data
* @ param handler
* The ResultHandler to notify of the query result and any updates to that result .
* @ param respondsToUpdatedOf
* A list of models excluding the queried model that... | if ( Model . class . isAssignableFrom ( resultClass ) ) { respondsToUpdatedOf = Utils . concatArrays ( respondsToUpdatedOf , new Class [ ] { resultClass } ) ; } final int loaderId = placeholderQuery . hashCode ( ) ; lm . restartLoader ( loaderId , null , getSupportLoaderCallbacks ( rawQuery , resultClass , handler , re... |
public class ESigService { /** * Tests if the esig item of the specified type and unique id exists .
* @ param esigType The esig type .
* @ param id The unique id .
* @ return True if a matching item exists in the list . */
@ Override public boolean exist ( IESigType esigType , String id ) { } } | return eSigList . indexOf ( esigType , id ) >= 0 ; |
public class EnvironmentCheck { /** * Stylesheet extension entrypoint : Dump a basic Xalan
* environment report from getEnvironmentHash ( ) to a Node .
* < p > Copy of writeEnvironmentReport that creates a Node suitable
* for other processing instead of a properties - like text output .
* @ param container Node... | if ( ( null == container ) || ( null == factory ) ) { return ; } try { Element envCheckNode = factory . createElement ( "EnvironmentCheck" ) ; envCheckNode . setAttribute ( "version" , "$Revision: 468646 $" ) ; container . appendChild ( envCheckNode ) ; if ( null == h ) { Element statusNode = factory . createElement ( ... |
public class RestClientUtil { /** * 获取文档 , 通过options设置获取文档的参数
* @ param indexName
* @ param indexType
* @ param documentId
* @ param options
* @ return
* @ throws ElasticSearchException */
public < T > T getDocument ( String indexName , String indexType , String documentId , Map < String , Object > options ... | try { SearchHit searchResult = this . client . executeRequest ( BuildTool . buildGetDocumentRequest ( indexName , indexType , documentId , options ) , null , new GetDocumentResponseHandler ( beanType ) , ClientUtil . HTTP_GET ) ; return ResultUtil . buildObject ( searchResult , beanType ) ; } catch ( ElasticSearchExcep... |
public class MultiInstanceCommandClass { /** * Create a MULTI _ CHANNEL _ CAPABILITY _ GET command .
* @ param nodeId the target node ID
* @ param endPoint the endpoint ID
* @ return a DataFrame instance */
public DataFrame createMultiChannelCapabilityGet ( byte nodeId , byte endPoint ) { } } | if ( getVersion ( ) < 2 ) { throw new ZWaveRuntimeException ( "MULTI_CHANNEL_CAPABILITY_GET is not available in command class version 1" ) ; } return createSendDataFrame ( "MULTI_CHANNEL_CAPABILITY_GET" , nodeId , new byte [ ] { MultiInstanceCommandClass . ID , MULTI_CHANNEL_CAPABILITY_GET , endPoint } , true ) ; |
public class EnumGene { /** * Create a new enum gene from the given valid genes and the chosen allele
* index .
* @ param < A > the allele type
* @ param alleleIndex the index of the allele for this gene .
* @ param validAlleles the array of valid alleles .
* @ return a new { @ code EnumGene } with the given ... | return new EnumGene < > ( alleleIndex , ISeq . of ( validAlleles ) ) ; |
public class AuthDataServiceImpl { /** * { @ inheritDoc } */
@ Override public Subject getSubject ( ManagedConnectionFactory managedConnectionFactory , String jaasEntryName , Map < String , Object > loginData ) throws LoginException { } } | if ( jaasEntryName != null ) { return createSubjectUsingJAAS ( jaasEntryName , managedConnectionFactory , loginData ) ; } else { return createSubjectUsingAuthData ( managedConnectionFactory , loginData ) ; } |
public class DeploymentNode { /** * Adds a child deployment node .
* @ param name the name of the deployment node
* @ param description a short description
* @ param technology the technology
* @ param instances the number of instances
* @ return a DeploymentNode object */
public DeploymentNode addDeploymentN... | return addDeploymentNode ( name , description , technology , instances , null ) ; |
public class AbstractFileRoutesLoader { /** * Helper method . Validates that the format of the controller and method is valid ( i . e . in the form of controller # method ) .
* @ param beanAndMethod the beanAndMethod string to be validated .
* @ return the same beanAndMethod that was received as an argument .
* @... | int hashPos = beanAndMethod . indexOf ( '#' ) ; if ( hashPos == - 1 ) { throw new ParseException ( "Unrecognized format for '" + beanAndMethod + "'" , line ) ; } return beanAndMethod ; |
public class AVUser { /** * whether user is authenticated or not .
* @ return */
@ JSONField ( serialize = false ) public boolean isAuthenticated ( ) { } } | // TODO : need to support thirdparty login .
String sessionToken = getSessionToken ( ) ; return ! StringUtil . isEmpty ( sessionToken ) ; |
public class NumberGauge { /** * { @ inheritDoc } */
@ Override public Number getValue ( int pollerIdx ) { } } | Number n = numberRef . get ( ) ; return n != null ? n : Double . NaN ; |
public class ResourceClient { /** * Upload file , only support image file ( jpg , bmp , gif , png ) currently ,
* file size should not larger than 8M .
* @ param path Necessary , the native path of the file you want to upload
* @ param fileType should be " image " or " file " or " voice "
* @ return UploadResul... | Preconditions . checkArgument ( null != path , "filename is necessary" ) ; Preconditions . checkArgument ( fileType . equals ( "image" ) || fileType . equals ( "file" ) || fileType . equals ( "voice" ) , "Illegal file type!" ) ; File file = new File ( path ) ; if ( file . exists ( ) && file . isFile ( ) ) { long fileSi... |
public class ClustersInner { /** * Stops a Kusto cluster .
* @ param resourceGroupName The name of the resource group containing the Kusto cluster .
* @ param clusterName The name of the Kusto cluster .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudException thrown... | stopWithServiceResponseAsync ( resourceGroupName , clusterName ) . toBlocking ( ) . last ( ) . body ( ) ; |
public class HandlerReference { /** * Create a new { @ link HandlerReference } from the given values .
* @ param component the component
* @ param method the method
* @ param priority the priority
* @ param filter the filter
* @ return the handler reference */
public static HandlerReference newRef ( Component... | if ( handlerTracking . isLoggable ( Level . FINE ) ) { return new VerboseHandlerReference ( component , method , priority , filter ) ; } else { return new HandlerReference ( component , method , priority , filter ) ; } |
public class DecimalStyle { /** * Obtains symbols for the specified locale .
* This method provides access to locale sensitive symbols .
* @ param locale the locale , not null
* @ return the info , not null */
public static DecimalStyle of ( Locale locale ) { } } | Jdk8Methods . requireNonNull ( locale , "locale" ) ; DecimalStyle info = CACHE . get ( locale ) ; if ( info == null ) { info = create ( locale ) ; CACHE . putIfAbsent ( locale , info ) ; info = CACHE . get ( locale ) ; } return info ; |
public class OMVRBTree { /** * Returns < tt > true < / tt > if this map maps one or more keys to the specified value . More formally , returns < tt > true < / tt > if and
* only if this map contains at least one mapping to a value < tt > v < / tt > such that
* < tt > ( value = = null ? v = = null : value . equals (... | for ( OMVRBTreeEntry < K , V > e = getFirstEntry ( ) ; e != null ; e = next ( e ) ) if ( valEquals ( value , e . getValue ( ) ) ) return true ; return false ; |
public class JMRandom { /** * Gets bounded number .
* @ param random the random
* @ param inclusiveLowerBound the inclusive lower bound
* @ param exclusiveUpperBound the exclusive upper bound
* @ return the bounded number */
public static int getBoundedNumber ( Random random , int inclusiveLowerBound , int excl... | return random . nextInt ( exclusiveUpperBound - inclusiveLowerBound ) + inclusiveLowerBound ; |
public class FileService { /** * copy files into sourceFolder into destination folder
* @ param copyResourcesMojo
* Implementation of mojo with goal ' copy '
* @ param sourceFolder
* The source folder
* @ param destinationFolder
* The destination folder
* @ param resource
* Resource to process
* @ par... | // check
if ( sourceFolder . isFile ( ) ) { throw new InvalidSourceException ( "Expected folder as source, not a file : '" + sourceFolder + "'" ) ; } if ( destinationFolder . isFile ( ) ) { throw new InvalidSourceException ( "Expected destination as source" ) ; } copyResourcesMojo . getLog ( ) . debug ( "Find file into... |
public class XmlUtils { /** * Converts the an XML file input stream to XML payload .
* @ param in the XML file input stream
* @ return the payload represents the XML file
* @ throws ApiException problem transforming XML to string */
public static String xmlToString ( InputStream in ) throws AlipayApiException { }... | Element root = getRootElementFromStream ( in ) ; return nodeToString ( root ) ; |
public class Geomem { /** * Returns a { @ link Predicate } that returns true if and only if a point is
* within the bounding box , exclusive of the top ( north ) and left ( west )
* edges .
* @ param topLeftLat
* latitude of top left point ( north west )
* @ param topLeftLon
* longitude of top left point ( ... | return new Predicate < Info < T , R > > ( ) { @ Override public boolean apply ( Info < T , R > info ) { return info . lat ( ) >= bottomRightLat && info . lat ( ) < topLeftLat && info . lon ( ) > topLeftLon && info . lon ( ) <= bottomRightLon ; } } ; |
public class NumberUtil { /** * 将10进制的String安全的转化为Long .
* 当str为空或非数字字符串时 , 返回default值 */
public static Long toLongObject ( @ Nullable String str , Long defaultValue ) { } } | if ( StringUtils . isEmpty ( str ) ) { return defaultValue ; } try { return Long . valueOf ( str ) ; } catch ( final NumberFormatException nfe ) { return defaultValue ; } |
public class ListPlaybackConfigurationsResult { /** * Array of playback configurations . This might be all the available configurations or a subset , depending on the
* settings that you provide and the total number of configurations stored .
* @ param items
* Array of playback configurations . This might be all ... | if ( items == null ) { this . items = null ; return ; } this . items = new java . util . ArrayList < PlaybackConfiguration > ( items ) ; |
public class ManagedInstancesInner { /** * Updates a managed instance .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param managedInstanceName The name of the managed instance .
* @ param p... | return updateWithServiceResponseAsync ( resourceGroupName , managedInstanceName , parameters ) . map ( new Func1 < ServiceResponse < ManagedInstanceInner > , ManagedInstanceInner > ( ) { @ Override public ManagedInstanceInner call ( ServiceResponse < ManagedInstanceInner > response ) { return response . body ( ) ; } } ... |
public class Select { /** * Returns the selected item or < code > null < / code > if no item is selected .
* @ return the selected items list */
public Option getSelectedItem ( ) { } } | for ( Entry < OptionElement , Option > entry : itemMap . entrySet ( ) ) { Option opt = entry . getValue ( ) ; if ( opt . isSelected ( ) ) return opt ; } return null ; |
public class CompressUtils { /** * 字符串压缩为GZIP字节数组
* @ param str
* @ param encoding
* @ return */
public static byte [ ] gzipCompress ( String str , String encoding ) { } } | if ( str == null || str . length ( ) == 0 ) { return null ; } ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; GZIPOutputStream gzip ; try { gzip = new GZIPOutputStream ( out ) ; gzip . write ( str . getBytes ( encoding ) ) ; gzip . close ( ) ; } catch ( IOException e ) { } return out . toByteArray ( ) ; |
public class InChITautomerGenerator { /** * Pops and pushes its ways through the InChI connection table to build up a simple molecule .
* @ param inputInchi user input InChI
* @ param inputMolecule user input molecule
* @ param inchiAtomsByPosition
* @ return molecule with single bonds and no hydrogens . */
pri... | String inchi = inputInchi ; inchi = inchi . substring ( inchi . indexOf ( '/' ) + 1 ) ; inchi = inchi . substring ( inchi . indexOf ( '/' ) + 1 ) ; String connections = inchi . substring ( 1 , inchi . indexOf ( '/' ) ) ; Pattern connectionPattern = Pattern . compile ( "(-|\\(|\\)|,|([0-9])*)" ) ; Matcher match = connec... |
public class SQLUtils { /** * 获得主键where子句 , 包含where关键字 。 会自动处理软删除条件
* @ param t
* @ param keyValues 返回传入sql的参数 , 如果提供list则写入
* @ return 返回值前面会带空格 , 以确保安全 。
* @ throws NoKeyColumnAnnotationException
* @ throws NullKeyValueException */
public static < T > String getKeysWhereSQL ( T t , List < Object > keyValues... | List < Field > keyFields = DOInfoReader . getKeyColumns ( t . getClass ( ) ) ; List < Object > _keyValues = new ArrayList < Object > ( ) ; String where = joinWhereAndGetValue ( keyFields , "AND" , _keyValues , t ) ; // 检查主键不允许为null
for ( Object value : keyValues ) { if ( value == null ) { throw new NullKeyValueExceptio... |
public class JobLauncherUtils { /** * Utility method that takes in a { @ link List } of { @ link WorkUnit } s , and flattens them . It builds up
* the flattened list by checking each element of the given list , and seeing if it is an instance of
* { @ link MultiWorkUnit } . If it is then it calls itself on the { @ ... | List < WorkUnit > flattenedWorkUnits = Lists . newArrayList ( ) ; for ( WorkUnit workUnit : workUnits ) { if ( workUnit instanceof MultiWorkUnit ) { flattenedWorkUnits . addAll ( flattenWorkUnits ( ( ( MultiWorkUnit ) workUnit ) . getWorkUnits ( ) ) ) ; } else { flattenedWorkUnits . add ( workUnit ) ; } } return flatte... |
public class SquigglyUtils { /** * Converts an object to an instance of the target type .
* @ param mapper the object mapper
* @ param source the source to convert
* @ param targetType the target class type
* @ return target instance
* @ see SquigglyUtils # objectify ( ObjectMapper , Object , Class ) */
publi... | try { return mapper . readValue ( mapper . writeValueAsBytes ( source ) , targetType ) ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } |
public class AbstractCodeCreator { /** * Gets a property by it ' s name
* @ param name the name of the property to find
* @ return the property or EMPTY */
public CreatorProperty findPropertyValue ( String name ) { } } | return properties ( ) . stream ( ) . filter ( p -> name . equals ( p . getName ( ) ) ) . findFirst ( ) . orElse ( EMPTY ) ; |
public class TreeWalker { /** * End processing of given node
* @ param node Node we just finished processing
* @ throws org . xml . sax . SAXException */
protected void endNode ( Node node ) throws org . xml . sax . SAXException { } } | switch ( node . getNodeType ( ) ) { case Node . DOCUMENT_NODE : break ; case Node . ELEMENT_NODE : String ns = m_dh . getNamespaceOfNode ( node ) ; if ( null == ns ) ns = "" ; this . m_contentHandler . endElement ( ns , m_dh . getLocalNameOfNode ( node ) , node . getNodeName ( ) ) ; if ( m_Serializer == null ) { // Don... |
public class CmsJspTagContainer { /** * Internal action method . < p >
* @ return EVAL _ BODY _ BUFFERED
* @ see javax . servlet . jsp . tagext . Tag # doStartTag ( ) */
@ Override public int doStartTag ( ) { } } | if ( CmsFlexController . isCmsRequest ( pageContext . getRequest ( ) ) ) { m_paramState = new ParamState ( CmsFlexController . getController ( pageContext . getRequest ( ) ) . getCurrentRequest ( ) ) ; m_paramState . init ( ) ; } return EVAL_BODY_BUFFERED ; |
public class KinesisStreamShard { /** * Utility function to convert { @ link KinesisStreamShard } into the new { @ link StreamShardMetadata } model .
* @ param kinesisStreamShard the { @ link KinesisStreamShard } to be converted
* @ return the converted { @ link StreamShardMetadata } */
public static StreamShardMet... | StreamShardMetadata streamShardMetadata = new StreamShardMetadata ( ) ; streamShardMetadata . setStreamName ( kinesisStreamShard . getStreamName ( ) ) ; streamShardMetadata . setShardId ( kinesisStreamShard . getShard ( ) . getShardId ( ) ) ; streamShardMetadata . setParentShardId ( kinesisStreamShard . getShard ( ) . ... |
public class AModuleModulesAssistantTC { /** * Generate the exportdefs list of definitions . The exports list of export declarations is processed by searching
* the defs list of locally defined objects . The exportdefs field is populated with the result .
* @ param m */
public void processExports ( AModuleModules m... | if ( m . getExports ( ) != null ) { m . getExportdefs ( ) . clear ( ) ; if ( ! m . getIsDLModule ( ) ) { m . getExportdefs ( ) . addAll ( getDefinitions ( m . getExports ( ) , m . getDefs ( ) ) ) ; } else { m . getExportdefs ( ) . addAll ( getDefinitions ( m . getExports ( ) ) ) ; } } |
public class ConstituencyTreeFactor { /** * Returns true if the boolean chart represents a set of spans that form a
* valid constituency tree , false otherwise . */
private static boolean isTree ( int n , boolean [ ] [ ] chart ) { } } | if ( ! chart [ 0 ] [ n ] ) { // Root must be a span .
return false ; } for ( int width = 1 ; width <= n ; width ++ ) { for ( int start = 0 ; start <= n - width ; start ++ ) { int end = start + width ; if ( width == 1 ) { if ( ! chart [ start ] [ end ] ) { // All width 1 spans must be set .
return false ; } } else { if ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.