signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class WheelCall { /** * Calls a wheel module function on the master asynchronously and
* returns information about the scheduled job that can be used to query the result .
* Authentication is done with the token therefore you have to login prior
* to using this function .
* @ param client SaltClient inst... | return client . call ( this , Client . WHEEL_ASYNC , Optional . empty ( ) , Collections . emptyMap ( ) , new TypeToken < Return < List < WheelAsyncResult < R > > > > ( ) { } , auth ) . thenApply ( wrapper -> { WheelAsyncResult < R > result = wrapper . getResult ( ) . get ( 0 ) ; result . setType ( getReturnType ( ) ) ;... |
public class ExportToFileClient { /** * Deprecate the current batch and create a new one . The old one will still
* be active until all writers have finished writing their current blocks
* to it . */
void roll ( ) { } } | m_batchLock . writeLock ( ) . lock ( ) ; final PeriodicExportContext previous = m_current ; try { m_current = new PeriodicExportContext ( ) ; m_logger . trace ( "Rolling batch." ) ; for ( ExportToFileDecoder decoder : m_tableDecoders . values ( ) ) { decoder . resetWriter ( ) ; } } finally { m_batchLock . writeLock ( )... |
public class TriggerContext { /** * Adds the specified triggers to the validator under construction .
* @ param triggers Triggers to be added .
* @ return Context allowing further construction of the validator using the DSL . */
public TriggerContext on ( Collection < Trigger > triggers ) { } } | if ( triggers != null ) { addedTriggers . addAll ( triggers ) ; } // Stay in the same context and re - use the same instance because no type has changed
return this ; |
public class Ec2IaasHandler { /** * ( non - Javadoc )
* @ see net . roboconf . target . api . TargetHandler
* # terminateMachine ( net . roboconf . target . api . TargetHandlerParameters , java . lang . String ) */
@ Override public void terminateMachine ( TargetHandlerParameters parameters , String machineId ) thr... | this . logger . fine ( "Terminating machine '" + machineId + "'." ) ; cancelMachineConfigurator ( machineId ) ; try { AmazonEC2 ec2 = createEc2Client ( parameters . getTargetProperties ( ) ) ; TerminateInstancesRequest terminateInstancesRequest = new TerminateInstancesRequest ( ) ; terminateInstancesRequest . withInsta... |
public class ORecordIteratorClusters { /** * Move the iterator to the end of the range . If no range was specified move to the last record of the cluster .
* @ return The object itself */
@ Override public ORecordIteratorClusters < REC > last ( ) { } } | currentClusterIdx = clusterIds . length - 1 ; current . clusterPosition = liveUpdated ? database . countClusterElements ( clusterIds [ currentClusterIdx ] ) : lastClusterPosition + 1 ; return this ; |
public class MapIterate { /** * For each key and value of the map , the function is evaluated with the key and value as the parameter .
* The results of these evaluations are collected into the target map . */
public static < K , V , V2 , R extends Map < K , V2 > > R collectValues ( Map < K , V > map , final Function... | MapIterate . forEachKeyValue ( map , new Procedure2 < K , V > ( ) { public void value ( K key , V value ) { target . put ( key , function . value ( key , value ) ) ; } } ) ; return target ; |
public class MainScene { /** * Apply the necessary rotation to the transform so that it is in front of
* the camera . The actual rotation is performed not using the yaw angle but
* using equivalent quaternion values for better accuracy . But the yaw angle
* is still returned for backward compatibility .
* @ par... | final float yaw = getMainCameraRigYaw ( ) ; GVRTransform t = getMainCameraRig ( ) . getHeadTransform ( ) ; widget . rotateWithPivot ( t . getRotationW ( ) , 0 , t . getRotationY ( ) , 0 , 0 , 0 , 0 ) ; return yaw ; |
public class AdGroupAdRotationMode { /** * Gets the adRotationMode value for this AdGroupAdRotationMode .
* @ return adRotationMode * < span class = " constraint CampaignType " > This field may only be
* set to OPTIMIZE for campaign channel subtype UNIVERSAL _ APP _ CAMPAIGN . < / span >
* < span class = " constr... | return adRotationMode ; |
public class HttpRequestBody { /** * Construct a HTTP POST Body from the variables in postParams */
public void setFormParams ( TreeSet < HtmlParameter > postParams ) { } } | if ( postParams . isEmpty ( ) ) { this . setBody ( "" ) ; return ; } StringBuilder postData = new StringBuilder ( ) ; for ( HtmlParameter parameter : postParams ) { if ( parameter . getType ( ) != HtmlParameter . Type . form ) { continue ; } postData . append ( parameter . getName ( ) ) ; postData . append ( '=' ) ; po... |
public class DomainsInner { /** * Get domain name recommendations based on keywords .
* Get domain name recommendations based on keywords .
* @ param parameters Search parameters for domain name recommendations .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observa... | return listRecommendationsWithServiceResponseAsync ( parameters ) . map ( new Func1 < ServiceResponse < Page < NameIdentifierInner > > , Page < NameIdentifierInner > > ( ) { @ Override public Page < NameIdentifierInner > call ( ServiceResponse < Page < NameIdentifierInner > > response ) { return response . body ( ) ; }... |
public class AdminToolDBBrowserExampleLoader { /** * vendor must be set and a type of { @ link Vendor }
* @ param xmlString
* @ throws JSONException
* @ throws IllegalArgumentException
* @ throws IOException
* @ throws JsonMappingException
* @ throws JsonParseException
* @ see ExampleStatements */
public ... | if ( LOGGER . isTraceEnabled ( ) ) { LOGGER . trace ( "Receiving json string: " + xmlString ) ; } JSONObject jsonobject = XML . toJSONObject ( xmlString ) ; String [ ] root = JSONObject . getNames ( jsonobject ) ; if ( null == root ) { throw new IllegalArgumentException ( "no root object in xml found" ) ; } if ( root .... |
public class RESTMBeanServerConnection { /** * { @ inheritDoc } */
@ Override public String getDefaultDomain ( ) throws IOException { } } | final String sourceMethod = "getDefaultDomain" ; checkConnection ( ) ; URL defaultDomainURL = null ; HttpsURLConnection connection = null ; try { // Get URL for default domain
defaultDomainURL = getDefaultDomainURL ( ) ; // Get connection to server
connection = getConnection ( defaultDomainURL , HttpMethod . GET ) ; } ... |
public class FrameAndRootPainter { /** * Get the paint to paint the inner highlight with .
* @ param s the highlight shape .
* @ return the paint . */
public Paint getFrameInnerHighlightPaint ( Shape s ) { } } | switch ( state ) { case BACKGROUND_ENABLED : return frameInnerHighlightInactive ; case BACKGROUND_ENABLED_WINDOWFOCUSED : return frameInnerHighlightActive ; } return null ; |
public class WSCredentialProvider { /** * { @ inheritDoc } Create a WSCredential for the WSPrincipal in the subject .
* If WSPrincipal is found , take no action . */
@ Override public void setCredential ( Subject subject ) throws CredentialException { } } | Set < WSPrincipal > principals = subject . getPrincipals ( WSPrincipal . class ) ; if ( principals . isEmpty ( ) ) { return ; } if ( principals . size ( ) != 1 ) { throw new CredentialException ( "Too many WSPrincipals in the subject" ) ; } WSPrincipal principal = principals . iterator ( ) . next ( ) ; setCredential ( ... |
public class ContractsApi { /** * Get public contract items Lists items of a public contract - - - This route
* is cached for up to 3600 seconds
* @ param contractId
* ID of a contract ( required )
* @ param datasource
* The server name you would like data from ( optional , default to
* tranquility )
* @ ... | com . squareup . okhttp . Call call = getContractsPublicItemsContractIdValidateBeforeCall ( contractId , datasource , ifNoneMatch , page , null ) ; Type localVarReturnType = new TypeToken < List < PublicContractsItemsResponse > > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class Scopes { /** * indexes the IEObject description using the given */
public static < T > Multimap < T , IEObjectDescription > index ( Iterable < IEObjectDescription > descriptions , Function < IEObjectDescription , T > indexer ) { } } | ArrayList < IEObjectDescription > list = Lists . newArrayList ( descriptions ) ; LinkedHashMultimap < T , IEObjectDescription > multimap = LinkedHashMultimap . create ( list . size ( ) , 1 ) ; for ( IEObjectDescription desc : list ) { multimap . put ( indexer . apply ( desc ) , desc ) ; } return multimap ; |
public class Closeables2 { /** * Close all { @ link Closeable } objects provided in the { @ code closeables }
* iterator . When encountering an error when closing , write the message out
* to the provided { @ code log } .
* @ param log The log where we will write error messages when failing to
* close a closeab... | closeAll ( Arrays . asList ( closeables ) , log ) ; |
public class TreeUtil { /** * Returns the tree item associated with the specified \ - delimited path .
* @ param tree Tree to search .
* @ param path \ - delimited path to search . Search is not case sensitive .
* @ param create If true , tree nodes are created if they do not already exist .
* @ param clazz Cla... | return findNode ( tree , path , create , clazz , MatchMode . CASE_INSENSITIVE ) ; |
public class StorageUpdate11 { /** * instead of ReportUtil . loadConvertedReport ( xml ) */
private void convertReports ( ) throws RepositoryException { } } | String statement = "/jcr:root" + ISO9075 . encodePath ( StorageConstants . REPORTS_ROOT ) + "//*[@className='ro.nextreports.server.domain.Report' and @type='Next']" + "//*[fn:name()='jcr:content' and @jcr:mimeType='text/xml']" ; QueryResult queryResult = getTemplate ( ) . query ( statement ) ; NodeIterator nodes = quer... |
public class MarkerRecordedEventAttributesMarshaller { /** * Marshall the given parameter object . */
public void marshall ( MarkerRecordedEventAttributes markerRecordedEventAttributes , ProtocolMarshaller protocolMarshaller ) { } } | if ( markerRecordedEventAttributes == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( markerRecordedEventAttributes . getMarkerName ( ) , MARKERNAME_BINDING ) ; protocolMarshaller . marshall ( markerRecordedEventAttributes . getDetails ( ) ,... |
public class PhysicalDatabaseParent { /** * Check all the cached tables and flush the old ones . */
private synchronized void checkCache ( ) { } } | Object [ ] pTables = m_setTableCacheList . toArray ( ) ; for ( Object objTable : pTables ) { PTable pTable = ( PTable ) objTable ; if ( pTable . addPTableOwner ( null ) == 1 ) { // Not currently being used is a candidate for flushing from the cache .
long lTimeLastUsed = pTable . getLastUsed ( ) ; long lTimeCurrent = S... |
public class AuthDirectiveParser { /** * http : / / javasourcecode . org / html / open - source / jdk / jdk - 6u23 / sun / net / www / HeaderParser . java . html */
public void parse ( ) throws AuthHeaderParsingException { } } | String [ ] parts = headerValue . trim ( ) . split ( "\\s+" , 2 ) ; if ( parts . length < 1 ) { throw new AuthHeaderParsingException ( "Unable to split scheme and other part in " + headerValue ) ; } builder . scheme ( parts [ 0 ] ) ; if ( parts . length == 1 ) { return ; } // FIXME : handle optional , one - time token
f... |
public class Math { /** * Returns the correlation coefficient between two vectors . */
public static double cor ( int [ ] x , int [ ] y ) { } } | if ( x . length != y . length ) { throw new IllegalArgumentException ( "Arrays have different length." ) ; } if ( x . length < 3 ) { throw new IllegalArgumentException ( "array length has to be at least 3." ) ; } double Sxy = cov ( x , y ) ; double Sxx = var ( x ) ; double Syy = var ( y ) ; if ( Sxx == 0 || Syy == 0 ) ... |
public class FaceletViewDeclarationLanguage { /** * { @ inheritDoc } */
@ Override public void renderView ( FacesContext context , UIViewRoot view ) throws IOException { } } | if ( ! view . isRendered ( ) ) { return ; } // log request
if ( log . isLoggable ( Level . FINE ) ) { log . fine ( "Rendering View: " + view . getViewId ( ) ) ; } try { // build view - but not if we ' re in " buildBeforeRestore "
// land and we ' ve already got a populated view . Note
// that this optimizations breaks ... |
public class GcsOutputChannelImpl { /** * Waits for the current outstanding request retrying it with exponential backoff if it fails .
* @ throws ClosedByInterruptException if request was interrupted
* @ throws IOException In the event of FileNotFoundException , MalformedURLException
* @ throws RetriesExhaustedEx... | if ( outstandingRequest == null ) { return ; } try { RetryHelper . runWithRetries ( new Callable < Void > ( ) { @ Override public Void call ( ) throws IOException , InterruptedException { if ( RetryHelper . getContext ( ) . getAttemptNumber ( ) > 1 ) { outstandingRequest . retry ( ) ; } token = outstandingRequest . wai... |
public class StreamBuilderImpl { /** * Reduce with a binary function
* < code > < pre >
* s = init ;
* s = op ( s , t1 ) ;
* s = op ( s , t2 ) ;
* result = s ;
* < / pre > < / code > */
@ Override public StreamBuilderImpl < T , U > reduce ( T init , BinaryOperatorSync < T > op ) { } } | return new ReduceOpInitSync < > ( this , init , op ) ; |
public class ResettableOAuth2AuthorizedClientService { /** * Copy of { @ link InMemoryOAuth2AuthorizedClientService # removeAuthorizedClient ( String , String ) } */
@ Override public void removeAuthorizedClient ( String clientRegistrationId , String principalName ) { } } | Assert . hasText ( clientRegistrationId , "clientRegistrationId cannot be empty" ) ; Assert . hasText ( principalName , "principalName cannot be empty" ) ; ClientRegistration registration = this . clientRegistrationRepository . findByRegistrationId ( clientRegistrationId ) ; if ( registration != null ) { this . authori... |
public class ObjectNameFactoryImpl { /** * Default behavior of Metrics 3 library , for fallback */
private ObjectName createMetrics3Name ( String domain , String name ) throws MalformedObjectNameException { } } | try { return new ObjectName ( domain , "name" , name ) ; } catch ( MalformedObjectNameException e ) { return new ObjectName ( domain , "name" , ObjectName . quote ( name ) ) ; } |
public class MappedFieldMetaData { /** * Prepares a proxy instance of a collection type for use as a { @ link Factory } .
* Proxy instances are always { @ link Factory factories } .
* Using { @ link Factory # newInstance ( net . sf . cglib . proxy . Callback ) }
* is significantly more efficient than using { @ li... | if ( this . isInstantiableCollectionType ) { return ( Factory ) Enhancer . create ( this . fieldType , ( LazyLoader ) ( ) -> null ) ; } return null ; |
public class PluginLoader { /** * Scans the classpath for given pluginType . If not found , default class is used . */
@ SuppressWarnings ( "unchecked" ) < T > T loadPlugin ( final Class < T > pluginType ) { } } | return ( T ) loadPlugin ( pluginType , null ) ; |
public class OptionalHeader { /** * Adjusts the file alignment to low alignment mode if necessary .
* @ return 1 if low alignment mode , file alignment value otherwise */
public long getAdjustedFileAlignment ( ) { } } | long fileAlign = get ( FILE_ALIGNMENT ) ; if ( isLowAlignmentMode ( ) ) { return 1 ; } if ( fileAlign < 512 ) { // TODO correct ?
fileAlign = 512 ; } // TODO what happens for too big alignment ?
// TODO this is just a test , verify
if ( fileAlign % 512 != 0 ) { long rest = fileAlign % 512 ; fileAlign += ( 512 - rest ) ... |
public class ConcurrentBigIntegerMinMaxHolder { /** * Convert a number to a big integer and try the best to preserve precision
* @ param numberthe number
* @ returnthe big integer , can be null if the number is null */
protected BigInteger toBigInteger ( Number number ) { } } | if ( number == null ) { return null ; } Class < ? > claz = number . getClass ( ) ; if ( claz == BigInteger . class ) { return ( BigInteger ) number ; } else if ( claz == BigDecimal . class ) { return ( ( BigDecimal ) number ) . toBigInteger ( ) ; } else if ( claz == Double . class ) { return new BigDecimal ( ( Double )... |
public class PortalSessionScope { /** * / * ( non - Javadoc )
* @ see org . springframework . beans . factory . config . Scope # remove ( java . lang . String ) */
@ Override public Object remove ( String name ) { } } | final HttpSession session = this . getPortalSesion ( false ) ; if ( session == null ) { return null ; } final Object sessionMutex = WebUtils . getSessionMutex ( session ) ; synchronized ( sessionMutex ) { final Object attribute = session . getAttribute ( name ) ; if ( attribute != null ) { session . removeAttribute ( n... |
public class NodeSelectorMarkupHandler { /** * Processing Instruction handling */
@ Override public void handleProcessingInstruction ( final char [ ] buffer , final int targetOffset , final int targetLen , final int targetLine , final int targetCol , final int contentOffset , final int contentLen , final int contentLin... | this . someSelectorsMatch = false ; for ( int i = 0 ; i < this . selectorsLen ; i ++ ) { this . selectorMatches [ i ] = this . selectorFilters [ i ] . matchProcessingInstruction ( false , this . markupLevel , this . markupBlocks [ this . markupLevel ] ) ; if ( this . selectorMatches [ i ] ) { this . someSelectorsMatch ... |
public class Sentence { /** * Returns a text representation of the tagging for this { @ link Sentence } , using the specified { @ link TagFormat } . In other words , each token in
* the sentence is given a tag indicating its position in a mention or that the token is not a mention . Assumes that each token is tagged ... | List < TaggedToken > taggedTokens = new ArrayList < TaggedToken > ( getTaggedTokens ( ) ) ; if ( reverse ) Collections . reverse ( taggedTokens ) ; StringBuffer trainingText = new StringBuffer ( ) ; for ( TaggedToken token : taggedTokens ) { trainingText . append ( token . getText ( format ) ) ; trainingText . append (... |
public class LocalVariablesSorter { /** * Creates a new local variable of the given type .
* @ param type
* the type of the local variable to be created .
* @ return the identifier of the newly created local variable . */
public int newLocal ( final Type type ) { } } | Object t ; switch ( type . getSort ( ) ) { case Type . BOOLEAN : case Type . CHAR : case Type . BYTE : case Type . SHORT : case Type . INT : t = Opcodes . INTEGER ; break ; case Type . FLOAT : t = Opcodes . FLOAT ; break ; case Type . LONG : t = Opcodes . LONG ; break ; case Type . DOUBLE : t = Opcodes . DOUBLE ; break... |
public class HystrixScriptModuleExecutor { /** * Execute a collection of ScriptModules identified by moduleId .
* @ param moduleIds moduleIds for modules to execute
* @ param executable execution logic to be performed for each module .
* @ param moduleLoader loader which manages the modules .
* @ return list of... | Objects . requireNonNull ( moduleIds , "moduleIds" ) ; Objects . requireNonNull ( executable , "executable" ) ; Objects . requireNonNull ( moduleLoader , "moduleLoader" ) ; List < ScriptModule > modules = new ArrayList < ScriptModule > ( moduleIds . size ( ) ) ; for ( String moduleId : moduleIds ) { ScriptModule module... |
public class Parameterized { /** * Given an object return the set of classes that it extends
* or implements .
* @ param inputClass object to describe
* @ return set of classes that are implemented or extended by that object */
private static Set < Class < ? > > describeClassTree ( Class < ? > inputClass ) { } } | if ( inputClass == null ) { return Collections . emptySet ( ) ; } // create result collector
Set < Class < ? > > classes = Sets . newLinkedHashSet ( ) ; // describe tree
describeClassTree ( inputClass , classes ) ; return classes ; |
public class ReadOptimizedGraphity { /** * update the ego network of a user
* @ param user
* user where changes have occurred */
private void updateEgoNetwork ( final Node user ) { } } | Node followedReplica , followingUser , lastPosterReplica ; Node prevReplica , nextReplica ; // loop through users following
for ( Relationship relationship : user . getRelationships ( SocialGraphRelationshipType . REPLICA , Direction . INCOMING ) ) { // load each replica and the user corresponding
followedReplica = rel... |
public class ThymeleafEngineConfigBuilder { /** * Adds a new dialect for this template engine , using the specified prefix .
* This dialect will be added to the set of currently configured ones .
* This operation can only be executed before processing templates for the
* first time . Once a template is processed ... | this . dialectsByPrefix ( ) . put ( prefix , dialect ) ; return this ; |
public class EnvLoader { /** * Returns the topmost dynamic class loader .
* @ param loader the context loader */
public static DynamicClassLoader getDynamicClassLoader ( ClassLoader loader ) { } } | for ( ; loader != null ; loader = loader . getParent ( ) ) { if ( loader instanceof DynamicClassLoader ) { return ( DynamicClassLoader ) loader ; } } return null ; |
public class PhoneNumberUtil { /** * get suggestions .
* @ param psearch search string
* @ param plimit limit entries
* @ param plocale locale
* @ return list of phone number data */
public final List < PhoneNumberData > getSuggstions ( final String psearch , final int plimit , final Locale plocale ) { } } | final List < PhoneNumberData > suggestList = new ArrayList < > ( plimit ) ; final String cleanedPhoneNumber = cleanString ( psearch ) ; PhoneCountryCodeData foundCounty = null ; final List < PhoneCountryCodeData > possibleCountries = new ArrayList < > ( plimit ) ; for ( final PhoneCountryCodeData countryCode : CreatePh... |
public class LssClient { /** * Update stream watermark in live stream service
* @ param domain The requested domain which the specific stream belongs to
* @ param app The requested app which the specific stream belongs to
* @ param stream The requested stream which need to update the watermark
* @ param waterma... | UpdateStreamWatermarkRequest request = new UpdateStreamWatermarkRequest ( ) . withDomain ( domain ) . withApp ( app ) . withStream ( stream ) . withWatermarks ( watermarks ) ; updateStreamWatermark ( request ) ; |
public class QEntity { /** * Parse an @ Embeddable
* @ param entityFactory
* @ param sessionFactory
* @ param prefix
* @ param type */
public void parseEmbeddable ( final QEntityFactory entityFactory , final SessionFactoryImplementor sessionFactory , final String prefix , final EmbeddableType < ? > type ) { } } | this . metamodelEmbeddable = type ; // Make sure the entity factory sees this embeddable
entityFactory . getEmbeddable ( type . getJavaType ( ) , type ) ; for ( Attribute < ? , ? > attribute : type . getAttributes ( ) ) { parseFields ( entityFactory , sessionFactory , prefix , attribute ) ; } |
public class StandardResponsesApi { /** * Get the details of a Standard Response .
* @ param id id of the Standard Response ( required )
* @ param getStandardResponseData ( required )
* @ return ApiResponse & lt ; ApiSuccessResponse & gt ;
* @ throws ApiException If fail to call the API , e . g . server error o... | com . squareup . okhttp . Call call = getStandardResponseValidateBeforeCall ( id , getStandardResponseData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class JSONUtil { /** * 转为实体类对象 , 转换异常将被抛出
* @ param < T > Bean类型
* @ param json JSONObject
* @ param beanClass 实体类对象
* @ return 实体类对象 */
public static < T > T toBean ( JSONObject json , Class < T > beanClass ) { } } | return null == json ? null : json . toBean ( beanClass ) ; |
public class Node { /** * Get the affiliations of this node .
* @ return List of { @ link Affiliation }
* @ throws NoResponseException
* @ throws XMPPErrorException
* @ throws NotConnectedException
* @ throws InterruptedException */
public List < Affiliation > getAffiliations ( ) throws NoResponseException , ... | return getAffiliations ( null , null ) ; |
public class OutputManager { /** * Starts every associated OutputExtension
* @ param outputPlugin the OutputPlugin to generate the Data for
* @ param t the argument or null
* @ param event the Event to generate for
* @ param < T > the type of the argument
* @ param < X > the return type
* @ return a List of... | IdentifiableSet < OutputExtensionModel < ? , ? > > extensions = outputExtensions . get ( outputPlugin . getID ( ) ) ; if ( extensions == null ) return new ArrayList < > ( ) ; return filterType ( extensions , outputPlugin ) . stream ( ) . map ( extension -> { try { // noinspection unchecked
return ( OutputExtensionModel... |
public class CmsBinaryPreviewContent { /** * Creates the list item for the resource information bean . < p >
* @ param resourceInfo the resource information bean
* @ param dndHandler the drag and drop handler
* @ return the list item widget */
private CmsListItem createListItem ( CmsResourceInfoBean resourceInfo ... | CmsListInfoBean infoBean = new CmsListInfoBean ( ) ; infoBean . setTitle ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( resourceInfo . getProperties ( ) . get ( CmsClientProperty . PROPERTY_TITLE ) ) ? resourceInfo . getProperties ( ) . get ( CmsClientProperty . PROPERTY_TITLE ) : resourceInfo . getTitle ( ) ) ; infoBe... |
public class GraphVizHelper { /** * Invoked the external process " neato " from the GraphViz package . Attention :
* this spans a sub - process !
* @ param sFileType
* The file type to be generated . E . g . " png " - see neato help for
* details . May neither be < code > null < / code > nor empty .
* @ param... | ValueEnforcer . notEmpty ( sFileType , "FileType" ) ; ValueEnforcer . notEmpty ( sDOT , "DOT" ) ; final ProcessBuilder aPB = new ProcessBuilder ( "neato" , "-T" + sFileType ) . redirectErrorStream ( false ) ; final Process p = aPB . start ( ) ; // Set neato stdin
p . getOutputStream ( ) . write ( sDOT . getBytes ( Stan... |
public class ApimanPathUtils { /** * Join endpoint and path with sensible / behaviour .
* @ param endpoint the endpoint
* @ param path the destination ( path )
* @ return the joined endpoint + destination . */
public static String join ( String endpoint , String path ) { } } | if ( endpoint == null || endpoint . isEmpty ( ) ) return path ; if ( path == null || path . isEmpty ( ) ) return endpoint ; if ( StringUtils . endsWith ( endpoint , "/" ) && path . startsWith ( "/" ) ) { return endpoint + path . substring ( 1 ) ; } else if ( StringUtils . endsWith ( endpoint , "/" ) ^ path . startsWith... |
public class FragmentBuilder { /** * This method pops the latest node from the trace
* fragment hierarchy .
* @ param cls The type of node to pop
* @ param uri The optional uri to match
* @ return The node */
public Node popNode ( Class < ? extends Node > cls , String uri ) { } } | synchronized ( nodeStack ) { // Check if fragment is in suppression mode
if ( suppress ) { if ( ! suppressedNodeStack . isEmpty ( ) ) { // Check if node is on the suppressed stack
Node suppressed = popNode ( suppressedNodeStack , cls , uri ) ; if ( suppressed != null ) { // Popped node from suppressed stack
return supp... |
public class StreamEx { /** * Returns a { @ link NavigableMap } whose keys and values are the result of
* applying the provided mapping functions to the input elements .
* This is a < a href = " package - summary . html # StreamOps " > terminal < / a >
* operation .
* If the mapped keys contains duplicates ( ac... | return rawCollect ( Collectors . toMap ( keyMapper , valMapper , mergeFunction , TreeMap :: new ) ) ; |
public class Version { /** * Loads the version info from version . properties . */
@ SuppressWarnings ( "nls" ) private void load ( ) { } } | URL url = Version . class . getResource ( "version.properties" ) ; if ( url == null ) { this . versionString = "Unknown" ; this . versionDate = new Date ( ) . toString ( ) ; } else { allProperties = new Properties ( ) ; try ( InputStream is = url . openStream ( ) ) { allProperties . load ( is ) ; this . versionString =... |
public class CollectionUtil { /** * Adds all items returned by the enumeration to the supplied collection
* and returns the supplied collection . */
@ ReplacedBy ( "com.google.common.collect.Iterators#addAll(Collection, com.google.common.collect.Iterators#forEnumeration(Enumeration))" ) public static < T , C extends ... | while ( enm . hasMoreElements ( ) ) { col . add ( enm . nextElement ( ) ) ; } return col ; |
public class JsonConfig { /** * Sets the current collection type used for collection transformations . < br >
* [ JSON - & gt ; Java ]
* @ param collectionType the target collection class for conversion */
public void setCollectionType ( Class collectionType ) { } } | if ( collectionType != null ) { if ( ! Collection . class . isAssignableFrom ( collectionType ) ) { throw new JSONException ( "The configured collectionType is not a Collection: " + collectionType . getName ( ) ) ; } this . collectionType = collectionType ; } else { collectionType = DEFAULT_COLLECTION_TYPE ; } |
public class SortOperationFactory { /** * Creates a valid { @ link SortTableOperation } operation .
* < p > < b > NOTE : < / b > if the collation is not explicitly specified for any expression , it is wrapped in a
* default ascending order
* @ param orders expressions describing order ,
* @ param child relation... | failIfStreaming ( ) ; List < Expression > convertedOrders = orders . stream ( ) . map ( f -> f . accept ( orderWrapper ) ) . collect ( Collectors . toList ( ) ) ; return new SortTableOperation ( convertedOrders , child ) ; |
public class Utils { /** * Get the Device ' s GMT Offset
* @ returnthe gmt offset in hours */
public static int getGMTOffset ( ) { } } | Calendar now = Calendar . getInstance ( ) ; return ( now . get ( Calendar . ZONE_OFFSET ) + now . get ( Calendar . DST_OFFSET ) ) / 3600000 ; |
public class SplittingBAMIndexer { /** * Write the given virtual offset to the index . This method is for internal use only .
* @ param virtualOffset virtual file pointer
* @ throws IOException */
public void writeVirtualOffset ( long virtualOffset ) throws IOException { } } | lb . put ( 0 , virtualOffset ) ; out . write ( byteBuffer . array ( ) ) ; |
public class RingBuffer { /** * Allows three user supplied arguments per event .
* @ param translator The user specified translation for the event
* @ param batchStartsAt The first element of the array which is within the batch .
* @ param batchSize The number of elements in the batch .
* @ param arg0 An array ... | checkBounds ( arg0 , arg1 , arg2 , batchStartsAt , batchSize ) ; final long finalSequence = sequencer . next ( batchSize ) ; translateAndPublishBatch ( translator , arg0 , arg1 , arg2 , batchStartsAt , batchSize , finalSequence ) ; |
public class TargetOutrankShareBiddingScheme { /** * Gets the maxCpcBidCeiling value for this TargetOutrankShareBiddingScheme .
* @ return maxCpcBidCeiling * Ceiling on max CPC bids . */
public com . google . api . ads . adwords . axis . v201809 . cm . Money getMaxCpcBidCeiling ( ) { } } | return maxCpcBidCeiling ; |
public class OutputQuartzHelper { /** * Gets the simple trigger .
* @ param timeUnit the time unit
* @ param timeInterval the time interval
* @ return the simple trigger */
public Trigger getSimpleTrigger ( TimeUnit timeUnit , int timeInterval ) { } } | SimpleScheduleBuilder simpleScheduleBuilder = null ; simpleScheduleBuilder = SimpleScheduleBuilder . simpleSchedule ( ) ; switch ( timeUnit ) { case MILLISECONDS : simpleScheduleBuilder . withIntervalInMilliseconds ( timeInterval ) . repeatForever ( ) ; break ; case SECONDS : simpleScheduleBuilder . withIntervalInSecon... |
public class ManifestRest { /** * Generates a manifest file asynchronously and uploads to DuraCloud
* @ param account
* @ param spaceId
* @ param storeId
* @ param format
* @ return The URI of the generated manifest . */
private URI generateAsynchronously ( String account , String spaceId , String storeId , S... | StorageProviderType providerType = getStorageProviderType ( storeId ) ; InputStream manifest = manifestResource . getManifest ( account , storeId , spaceId , format ) ; String contentId = MessageFormat . format ( "generated-manifests/manifest-{0}_{1}_{2}.txt{3}" , spaceId , providerType . name ( ) . toLowerCase ( ) , D... |
public class AbstractEventBuilder { /** * Creates a new camunda input parameter extension element with the
* given name and value .
* @ param name the name of the input parameter
* @ param value the value of the input parameter
* @ return the builder object */
public B camundaInputParameter ( String name , Stri... | CamundaInputOutput camundaInputOutput = getCreateSingleExtensionElement ( CamundaInputOutput . class ) ; CamundaInputParameter camundaInputParameter = createChild ( camundaInputOutput , CamundaInputParameter . class ) ; camundaInputParameter . setCamundaName ( name ) ; camundaInputParameter . setTextContent ( value ) ;... |
public class Introspector { /** * 根据信息查询FastMethod , 已经有cache实现 。
* @ param clazz
* @ param methodName
* @ param parameterTypes
* @ return */
public FastMethod getFastMethod ( Class < ? > clazz , String methodName , Class ... parameterTypes ) { } } | String clazzName = clazz . getName ( ) ; String methodKey = buildMethodKey ( clazzName , methodName , parameterTypes ) ; FastMethod method = fastMethodCache . get ( methodKey ) ; if ( null == method ) { getFastClass ( clazz ) ; // 分析一次clazz , 这时会跟新fastMethodCache
return fastMethodCache . get ( methodKey ) ; } else { re... |
public class ClusterLocator { /** * Locates the local address of the nearest group node if one exists .
* @ param cluster The cluster in which to search for the node .
* @ param group The group to search .
* @ param doneHandler A handler to be called once the address has been located . */
public void locateGroup ... | locateGroup ( String . format ( "%s.%s" , cluster , group ) , doneHandler ) ; |
public class Visibility { /** * Subclasses should override this method or
* { @ link # onDisappear ( ViewGroup , View , TransitionValues , TransitionValues ) }
* if they need to create an Animator when targets disappear .
* The method should only be called by the Visibility class ; it is
* not intended to be ca... | if ( ( mMode & MODE_OUT ) != MODE_OUT ) { return null ; } View startView = ( startValues != null ) ? startValues . view : null ; View endView = ( endValues != null ) ? endValues . view : null ; View overlayView = null ; View viewToKeep = null ; boolean reusingCreatedOverlayView = false ; boolean createOverlayFromStartV... |
public class RestClusterClient { /** * Requests the job details .
* @ param jobId The job id
* @ return Job details */
public CompletableFuture < JobDetailsInfo > getJobDetails ( JobID jobId ) { } } | final JobDetailsHeaders detailsHeaders = JobDetailsHeaders . getInstance ( ) ; final JobMessageParameters params = new JobMessageParameters ( ) ; params . jobPathParameter . resolve ( jobId ) ; return sendRequest ( detailsHeaders , params ) ; |
public class IniFile { /** * Helper method to check the existance of a file .
* @ param the full path and name of the file to be checked .
* @ return true if file exists , false otherwise . */
private boolean checkFile ( String pstrFile ) { } } | boolean blnRet = false ; File objFile = null ; try { objFile = new CSFile ( pstrFile ) ; blnRet = ( objFile . exists ( ) && objFile . isFile ( ) ) ; } catch ( Exception e ) { blnRet = false ; } finally { if ( objFile != null ) objFile = null ; } return blnRet ; |
public class Proxies { /** * Returns true if the given object was created via { @ link Proxies } . */
public static boolean isForgeProxy ( Object object ) { } } | if ( object != null ) { Class < ? > [ ] interfaces = object . getClass ( ) . getInterfaces ( ) ; if ( interfaces != null ) { for ( Class < ? > iface : interfaces ) { if ( iface . getName ( ) . equals ( ForgeProxy . class . getName ( ) ) ) { return true ; } } } } return false ; |
public class DataXceiver { /** * Read / write data from / to the DataXceiveServer . */
public void run ( ) { } } | DataInputStream in = null ; byte op = - 1 ; int opsProcessed = 0 ; try { s . setTcpNoDelay ( true ) ; s . setSoTimeout ( datanode . socketTimeout * 5 ) ; in = new DataInputStream ( new BufferedInputStream ( NetUtils . getInputStream ( s ) , SMALL_BUFFER_SIZE ) ) ; int stdTimeout = s . getSoTimeout ( ) ; // We process r... |
public class TaskOperations { /** * Lists the { @ link SubtaskInformation subtasks } of the specified task .
* @ param jobId
* The ID of the job containing the task .
* @ param taskId
* The ID of the task .
* @ return A list of { @ link SubtaskInformation } objects .
* @ throws BatchErrorException
* Excep... | return listSubtasks ( jobId , taskId , null , null ) ; |
public class CaretSelectionBindImpl { /** * Assumes that { @ code getArea ( ) . getLength ! = 0 } is true and { @ link BreakIterator # setText ( String ) } has been called */
private int calculatePositionViaBreakingBackwards ( int numOfBreaks , BreakIterator breakIterator , int position ) { } } | breakIterator . preceding ( position ) ; for ( int i = 1 ; i < numOfBreaks ; i ++ ) { breakIterator . previous ( ) ; } return breakIterator . current ( ) ; |
public class SVGUtil { /** * main */
private static boolean viewSVG ( File file ) throws IOException { } } | if ( "Mac OS X" . equals ( System . getProperty ( "os.name" ) ) ) { Runtime . getRuntime ( ) . exec ( String . format ( "open -a /Applications/Safari.app %s" , file . getAbsoluteFile ( ) ) ) ; return true ; } return false ; |
public class DescribeGlobalTableRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeGlobalTableRequest describeGlobalTableRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeGlobalTableRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeGlobalTableRequest . getGlobalTableName ( ) , GLOBALTABLENAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall... |
public class Currency { /** * Attempt to parse the given string as a currency , either as a
* display name in the given locale , or as a 3 - letter ISO 4217
* code . If multiple display names match , then the longest one is
* selected . If both a display name and a 3 - letter ISO code
* match , then the display... | List < TextTrieMap < CurrencyStringInfo > > currencyTrieVec = CURRENCY_NAME_CACHE . get ( locale ) ; if ( currencyTrieVec == null ) { TextTrieMap < CurrencyStringInfo > currencyNameTrie = new TextTrieMap < CurrencyStringInfo > ( true ) ; TextTrieMap < CurrencyStringInfo > currencySymbolTrie = new TextTrieMap < Currency... |
public class MainFrame { /** * Sets the title of the main window .
* The actual title set is the given { @ code title } followed by the program name and version .
* @ see Constant # PROGRAM _ NAME
* @ see Constant # PROGRAM _ VERSION
* @ deprecated as of 2.7.0 , replaced by { @ link # setTitle ( Session ) } */
... | StringBuilder strBuilder = new StringBuilder ( ) ; if ( title != null && ! title . isEmpty ( ) ) { strBuilder . append ( title ) ; strBuilder . append ( " - " ) ; } strBuilder . append ( Constant . PROGRAM_NAME ) . append ( ' ' ) . append ( Constant . PROGRAM_VERSION ) ; super . setTitle ( strBuilder . toString ( ) ) ; |
public class DeploymentReflectionIndex { /** * Construct a new instance .
* @ return the new instance */
public static DeploymentReflectionIndex create ( ) { } } | final SecurityManager sm = System . getSecurityManager ( ) ; if ( sm != null ) { sm . checkPermission ( ServerPermission . CREATE_DEPLOYMENT_REFLECTION_INDEX ) ; } return new DeploymentReflectionIndex ( ) ; |
public class UfsJournal { /** * Transitions the journal from secondary to primary mode . The journal will apply the latest
* journal entries to the state machine , then begin to allow writes . */
public synchronized void gainPrimacy ( ) throws IOException { } } | Preconditions . checkState ( mWriter == null , "writer must be null in secondary mode" ) ; Preconditions . checkState ( mTailerThread != null , "tailer thread must not be null in secondary mode" ) ; mTailerThread . awaitTermination ( true ) ; long nextSequenceNumber = mTailerThread . getNextSequenceNumber ( ) ; mTailer... |
public class Strings { /** * Joins all non - null elements of the given < code > elements < / code > into one String .
* @ param delimiter Inserted as separator between consecutive elements .
* @ param elements The elements to join .
* @ return A long string containing all non - null elements . */
public static S... | final StringBuilder sb = new StringBuilder ( ) ; for ( final Object part : elements ) { if ( part == null ) { continue ; } if ( sb . length ( ) > 0 ) { sb . append ( delimiter ) ; } sb . append ( part . toString ( ) ) ; } return sb . toString ( ) ; |
public class JdbcAccessImpl { /** * performs an INSERT operation against RDBMS .
* @ param obj The Object to be inserted as a row of the underlying table .
* @ param cld ClassDescriptor providing mapping information . */
public void executeInsert ( ClassDescriptor cld , Object obj ) throws PersistenceBrokerExceptio... | if ( logger . isDebugEnabled ( ) ) { logger . debug ( "executeInsert: " + obj ) ; } final StatementManagerIF sm = broker . serviceStatementManager ( ) ; PreparedStatement stmt = null ; try { stmt = sm . getInsertStatement ( cld ) ; if ( stmt == null ) { logger . error ( "getInsertStatement returned a null statement" ) ... |
public class CmsSimpleSearchConfigurationParser { /** * The default field facets .
* @ param categoryConjunction flag , indicating if category selections in the facet should be " AND " combined .
* @ return the default field facets . */
private Map < String , I_CmsSearchConfigurationFacetField > getDefaultFieldFace... | Map < String , I_CmsSearchConfigurationFacetField > fieldFacets = new HashMap < String , I_CmsSearchConfigurationFacetField > ( ) ; fieldFacets . put ( CmsListManager . FIELD_CATEGORIES , new CmsSearchConfigurationFacetField ( CmsListManager . FIELD_CATEGORIES , null , Integer . valueOf ( 1 ) , Integer . valueOf ( 200 ... |
public class Password { public String toTraceString ( ) { } } | if ( _traceableString == null ) { if ( _password != null ) { try { MessageDigest digester = MessageDigest . getInstance ( "SHA-256" ) ; digester . update ( SALT ) ; for ( char c : _password ) { digester . update ( ( byte ) ( ( c & 0xFF00 ) >> 8 ) ) ; digester . update ( ( byte ) ( ( c & 0x00FF ) ) ) ; } byte [ ] hash =... |
public class UNode { /** * Parse the JSON text from the given character Reader and return the appropriate
* UNode object . If an error occurs reading from the reader , it is passed to the
* caller . The reader is closed when parsing is done . The only JSON documents we
* allow are in the form :
* < pre >
* { ... | assert reader != null ; SajListener listener = new SajListener ( ) ; try { new JSONAnnie ( reader ) . parse ( listener ) ; } finally { Utils . close ( reader ) ; } return listener . getRootNode ( ) ; |
public class SequenceBasesFix { /** * Method to delete the base n ' s at the beginning and end of the sequence */
private ByteBuffer removeChar ( Sequence sequenceObj ) { } } | byte [ ] sequenceByte = sequenceObj . getSequenceByte ( ) ; int beginPosition = 0 ; int endPosition = ( int ) sequenceObj . getLength ( ) ; if ( sequenceByte [ 0 ] == 'n' ) { for ( byte base : sequenceByte ) { if ( 'n' == ( char ) base ) { beginPosition ++ ; beginDelSequenceStr += ( char ) base ; } else { break ; } } i... |
public class CHFWBundle { /** * DS method to remove a factory provider .
* @ param provider */
protected void unsetFactoryProvider ( ChannelFactoryProvider provider ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Remove factory provider; " + provider ) ; } this . chfw . deregisterFactories ( provider ) ; |
public class SearchParameter { /** * syntactic sugar */
public SearchParameterContactComponent addContact ( ) { } } | SearchParameterContactComponent t = new SearchParameterContactComponent ( ) ; if ( this . contact == null ) this . contact = new ArrayList < SearchParameterContactComponent > ( ) ; this . contact . add ( t ) ; return t ; |
public class AmazonS3Client { /** * Retrieves the region of the bucket by making a HeadBucket request to us - west - 1 region .
* Currently S3 doesn ' t return region in a HEAD Bucket request if the bucket
* owner has enabled bucket to accept only SigV4 requests via bucket
* policies . */
private String getBucket... | String bucketRegion = null ; try { Request < HeadBucketRequest > request = createRequest ( bucketName , null , new HeadBucketRequest ( bucketName ) , HttpMethodName . HEAD ) ; request . addHandlerContext ( HandlerContextKey . OPERATION_NAME , "HeadBucket" ) ; HeadBucketResult result = invoke ( request , new HeadBucketR... |
public class BadAlias { /** * syck _ badalias _ initialize */
@ JRubyMethod public static IRubyObject initialize ( IRubyObject self , IRubyObject val ) { } } | ( ( RubyObject ) self ) . fastSetInstanceVariable ( "@name" , val ) ; return self ; |
public class FilePath { /** * Creates a zip file from this directory by only including the files that match the given glob .
* @ param glob
* Ant style glob , like " * * & # x2F ; * . xml " . If empty or null , this method
* works like { @ link # createZipArchive ( OutputStream ) } , inserting a top - level direc... | archive ( ArchiverFactory . ZIP , os , glob ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link String } { @ code > } */
@ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "renditionFilter" , scope = GetObjectByPath . class ) public JAXBElement < String > createGetObjec... | return new JAXBElement < String > ( _GetObjectOfLatestVersionRenditionFilter_QNAME , String . class , GetObjectByPath . class , value ) ; |
public class DefaultBeanManager { /** * Validate populated values based on JSR 303.
* @ param bean the bean to validate
* @ throws PropertyException validation error */
private void validateBean ( Object bean ) throws PropertyException { } } | if ( getValidatorFactory ( ) != null ) { Validator validator = getValidatorFactory ( ) . getValidator ( ) ; Set < ConstraintViolation < Object > > constraintViolations = validator . validate ( bean ) ; if ( ! constraintViolations . isEmpty ( ) ) { throw new PropertyException ( "Failed to validate bean: [" + constraintV... |
public class ResolvedTypes { /** * / * @ Nullable */
@ Override public LightweightTypeReference getActualType ( JvmIdentifiableElement identifiable ) { } } | LightweightTypeReference result = doGetActualType ( identifiable , false ) ; return toOwnedReference ( result ) ; |
public class AggregateContainer { /** * Performs the output aggregation and generates the { @ link WorkerToMasterReports } to report back to the
* { @ link org . apache . reef . vortex . driver . VortexDriver } . */
private void aggregateTasklets ( final AggregateTriggerType type ) { } } | final List < WorkerToMasterReport > workerToMasterReports = new ArrayList < > ( ) ; final List < Object > results = new ArrayList < > ( ) ; final List < Integer > aggregatedTasklets = new ArrayList < > ( ) ; // Synchronization to prevent duplication of work on the same aggregation function on the same worker .
synchron... |
public class EndpointBuilder { /** * { @ inheritDoc } */
@ Override public Endpoint buildObject ( String namespaceURI , String localName , String namespacePrefix ) { } } | return new EndpointImpl ( namespaceURI , localName , namespacePrefix ) ; |
public class DatatypeConverter { /** * Print work units .
* @ param value TimeUnit instance
* @ return work units value */
public static final BigInteger printWorkUnits ( TimeUnit value ) { } } | int result ; if ( value == null ) { value = TimeUnit . HOURS ; } switch ( value ) { case MINUTES : { result = 1 ; break ; } case DAYS : { result = 3 ; break ; } case WEEKS : { result = 4 ; break ; } case MONTHS : { result = 5 ; break ; } case YEARS : { result = 7 ; break ; } default : case HOURS : { result = 2 ; break ... |
public class AbstractTlsDirContextAuthenticationStrategy { /** * / * ( non - Javadoc )
* @ see org . springframework . ldap . core . support . DirContextAuthenticationStrategy # processContextAfterCreation ( javax . naming . directory . DirContext , java . lang . String , java . lang . String ) */
public final DirCon... | if ( ctx instanceof LdapContext ) { final LdapContext ldapCtx = ( LdapContext ) ctx ; final StartTlsResponse tlsResponse = ( StartTlsResponse ) ldapCtx . extendedOperation ( new StartTlsRequest ( ) ) ; try { if ( hostnameVerifier != null ) { tlsResponse . setHostnameVerifier ( hostnameVerifier ) ; } tlsResponse . negot... |
public class OjbMemberTagsHandler { /** * Evaluates the body if current member has no tag with the specified name .
* @ param template The body of the block tag
* @ param attributes The attributes of the template tag
* @ exception XDocletException Description of Exception
* @ doc . tag type = " block "
* @ do... | boolean result = false ; if ( getCurrentField ( ) != null ) { if ( ! hasTag ( attributes , FOR_FIELD ) ) { result = true ; generate ( template ) ; } } else if ( getCurrentMethod ( ) != null ) { if ( ! hasTag ( attributes , FOR_METHOD ) ) { result = true ; generate ( template ) ; } } if ( ! result ) { String error = att... |
public class StrSubstitutor { /** * Replaces all the occurrences of variables with their matching values
* from the resolver using the given source as a template .
* The source is not altered by this method .
* @ param source the buffer to use as a template , not changed , null returns null
* @ return the resul... | if ( source == null ) { return null ; } return replace ( source , 0 , source . length ( ) ) ; |
public class GoogleCloudStorageReadChannel { /** * Reads from this channel and stores read data in the given buffer .
* < p > On unexpected failure , will attempt to close the channel and clean up state .
* @ param buffer buffer to read data into
* @ return number of bytes read or - 1 on end - of - stream
* @ t... | throwIfNotOpen ( ) ; // Don ' t try to read if the buffer has no space .
if ( buffer . remaining ( ) == 0 ) { return 0 ; } logger . atFine ( ) . log ( "Reading %s bytes at %s position from '%s'" , buffer . remaining ( ) , currentPosition , resourceIdString ) ; // Do not perform any further reads if we already read ever... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.