signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class BuySr { /** * < p > Get authorized or not buyer . < / p >
* @ param pRqVs request scoped vars
* @ param pRqDt Request Data
* @ return buyer or null
* @ throws Exception - an exception */
@ Override public final OnlineBuyer getBuyr ( final Map < String , Object > pRqVs , final IRequestData pRqDt ) t... | Long buyerId = null ; String buyerIdStr = pRqDt . getCookieValue ( "cBuyerId" ) ; if ( buyerIdStr != null && buyerIdStr . length ( ) > 0 ) { buyerId = Long . valueOf ( buyerIdStr ) ; } OnlineBuyer buyer = null ; if ( buyerId != null ) { buyer = getSrvOrm ( ) . retrieveEntityById ( pRqVs , OnlineBuyer . class , buyerId ... |
public class LongIterator { /** * Lazy evaluation .
* @ param iteratorSupplier
* @ return */
public static LongIterator of ( final Supplier < ? extends LongIterator > iteratorSupplier ) { } } | N . checkArgNotNull ( iteratorSupplier , "iteratorSupplier" ) ; return new LongIterator ( ) { private LongIterator iter = null ; private boolean isInitialized = false ; @ Override public boolean hasNext ( ) { if ( isInitialized == false ) { init ( ) ; } return iter . hasNext ( ) ; } @ Override public long nextLong ( ) ... |
public class ArrayUtil { /** * Returns first element in given { @ code array } .
* if { @ code array } is null or of length zero , then returns { @ code null } */
public static < T > T getFirst ( T array [ ] ) { } } | return array != null && array . length > 0 ? array [ 0 ] : null ; |
public class FeedbackApi { /** * Submit a feedback
* Submit a feedback
* @ param submitFeedbackData Request parameters . ( required )
* @ return ApiResponse & lt ; ApiSuccessResponse & gt ;
* @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */
public A... | com . squareup . okhttp . Call call = submitFeedbackValidateBeforeCall ( submitFeedbackData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class DropboxClient { /** * Returns metadata information about specified resource with
* checking for its hash with specified max child entries count .
* If nothing changes ( hash isn ' t changed ) then 304 will returns .
* @ param path to file or directory
* @ param fileLimit max child entries count
*... | "PointlessBooleanExpression" } ) public Entry getMetadata ( String path , int fileLimit , @ Nullable String hash , boolean list ) { OAuthRequest request = new OAuthRequest ( Verb . GET , METADATA_URL + encode ( path ) ) ; if ( fileLimit != FILE_LIMIT ) request . addQuerystringParameter ( "file_limit" , Integer . toStri... |
public class CssSkinGenerator { /** * Initialize the skinMapping from the parent path
* @ param rsBrowser
* the resource browser
* @ param rootDir
* the skin root dir path
* @ param defaultSkinName
* the default skin name
* @ param defaultLocaleName
* the default locale name */
private Map < String , Va... | Set < String > paths = rsBrowser . getResourceNames ( rootDir ) ; Set < String > skinNames = new HashSet < > ( ) ; Set < String > localeVariants = new HashSet < > ( ) ; for ( Iterator < String > itPath = paths . iterator ( ) ; itPath . hasNext ( ) ; ) { String path = rootDir + itPath . next ( ) ; if ( rsBrowser . isDir... |
public class OrtcClient { /** * = = = = = Raise of events = = = = = */
protected void raiseOrtcEvent ( EventEnum eventToRaise , Object ... args ) { } } | switch ( eventToRaise ) { case OnConnected : raiseOnConnected ( args ) ; break ; case OnDisconnected : raiseOnDisconnected ( args ) ; break ; case OnException : raiseOnException ( args ) ; break ; case OnReconnected : raiseOnReconnected ( args ) ; break ; case OnReconnecting : raiseOnReconnecting ( args ) ; break ; cas... |
public class CountingLruMap { /** * Adds the element to the map , and removes the old element with the same key if any . */
@ Nullable public synchronized V put ( K key , V value ) { } } | // We do remove and insert instead of just replace , in order to cause a structural change
// to the map , as we always want the latest inserted element to be last in the queue .
V oldValue = mMap . remove ( key ) ; mSizeInBytes -= getValueSizeInBytes ( oldValue ) ; mMap . put ( key , value ) ; mSizeInBytes += getValue... |
public class XmlTransformer { /** * Returns a Templates object , i . e . a compiled XSLT stylesheet
* of the specified URL .
* Once the stylesheet is loaded , it is cached for the next time .
* That is , firstly , the cache is searched for the URL .
* @ param stylesheet
* the URL of the stylesheet .
* @ ret... | Templates templates = _templatesCache . get ( stylesheet ) ; if ( templates == null ) { InputStream is = null ; try { is = stylesheet . openStream ( ) ; // throws IOException
templates = TransformerFactory . newInstance ( ) . newTemplates ( new StreamSource ( is ) ) ; // throws TransformerConfigurationException
} catch... |
public class CmsUgcSessionFactory { /** * Returns the session , if already initialized . < p >
* @ param request the request
* @ param sessionId the form session id
* @ return the session */
public CmsUgcSession getSession ( HttpServletRequest request , CmsUUID sessionId ) { } } | return ( CmsUgcSession ) request . getSession ( true ) . getAttribute ( "" + sessionId ) ; |
public class InternalPureXbaseParser { /** * InternalPureXbase . g : 121:1 : entryRuleSpecialBlockExpression returns [ EObject current = null ] : iv _ ruleSpecialBlockExpression = ruleSpecialBlockExpression EOF ; */
public final EObject entryRuleSpecialBlockExpression ( ) throws RecognitionException { } } | EObject current = null ; EObject iv_ruleSpecialBlockExpression = null ; try { // InternalPureXbase . g : 121:63 : ( iv _ ruleSpecialBlockExpression = ruleSpecialBlockExpression EOF )
// InternalPureXbase . g : 122:2 : iv _ ruleSpecialBlockExpression = ruleSpecialBlockExpression EOF
{ if ( state . backtracking == 0 ) { ... |
public class Utils { /** * Transforms the given map by replacing the keys mapped by { @ code mapper } . Any keys not in the
* mapper preserve their original keys . If a key in the mapper maps to null or a blank string ,
* that value is dropped .
* < p > e . g . transform ( { a : 1 , b : 2 , c : 3 } , { a : a , c ... | Map < String , T > out = new LinkedHashMap < > ( in . size ( ) ) ; for ( Map . Entry < String , T > entry : in . entrySet ( ) ) { String key = entry . getKey ( ) ; if ( ! mapper . containsKey ( key ) ) { out . put ( key , entry . getValue ( ) ) ; // keep the original key .
continue ; } String mappedKey = mapper . get (... |
public class PolygonType { /** * Gets the value of the interior property .
* This accessor method returns a reference to the live list ,
* not a snapshot . Therefore any modification you make to the
* returned list will be present inside the JAXB object .
* This is why there is not a < CODE > set < / CODE > met... | if ( interior == null ) { interior = new ArrayList < JAXBElement < AbstractRingPropertyType > > ( ) ; } return this . interior ; |
public class LogicalUnitOfWork { /** * Simplified serialization .
* @ param java . io . DataOutputStream to write the serialized Object into . */
public void writeObject ( java . io . DataOutputStream dataOutputStream ) throws ObjectManagerException { } } | if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "writeObject" , "dataOutputStream=" + dataOutputStream ) ; try { dataOutputStream . writeByte ( SimpleSerialVersion ) ; dataOutputStream . writeLong ( identifier ) ; if ( XID == null ) { dataOutputStream . writeByte (... |
public class LogbackReconfigure { /** * 重新配置当前logback
* @ param config logback的xml配置文件 */
public static void reconfigure ( InputStream config ) { } } | if ( CONTEXT == null ) { log . warn ( "当前日志上下文不是logback,不能使用该配置器重新配置" ) ; return ; } reconfigure ( config , CONTEXT ) ; |
public class CommerceSubscriptionEntryPersistenceImpl { /** * Returns the commerce subscription entry where CPInstanceUuid = & # 63 ; and CProductId = & # 63 ; and commerceOrderItemId = & # 63 ; or returns < code > null < / code > if it could not be found , optionally using the finder cache .
* @ param CPInstanceUuid... | Object [ ] finderArgs = new Object [ ] { CPInstanceUuid , CProductId , commerceOrderItemId } ; Object result = null ; if ( retrieveFromCache ) { result = finderCache . getResult ( FINDER_PATH_FETCH_BY_C_C_C , finderArgs , this ) ; } if ( result instanceof CommerceSubscriptionEntry ) { CommerceSubscriptionEntry commerce... |
public class CmsPreEditorAction { /** * Forwards to the editor and opens it after the action was performed . < p >
* @ param dialog the dialog instance forwarding to the editor
* @ param additionalParams eventual additional request parameters for the editor to use */
public static void sendForwardToEditor ( CmsDial... | // create the Map of original request parameters
Map < String , String [ ] > params = CmsRequestUtil . createParameterMap ( dialog . getParamOriginalParams ( ) ) ; // put the parameter indicating that the pre editor action was executed
params . put ( PARAM_PREACTIONDONE , new String [ ] { CmsStringUtil . TRUE } ) ; if ... |
public class DateCaster { /** * parse a string to a Datetime Object
* @ param locale
* @ param str String representation of a locale Date
* @ param tz
* @ return DateTime Object
* @ throws PageException */
public static DateTime toDateTime ( Locale locale , String str , TimeZone tz , boolean useCommomDatePars... | DateTime dt = toDateTime ( locale , str , tz , null , useCommomDateParserAsWell ) ; if ( dt == null ) { String prefix = locale . getLanguage ( ) + "-" + locale . getCountry ( ) + "-" ; throw new ExpressionException ( "can't cast [" + str + "] to date value" , "to add custom formats for " + LocaleFactory . toString ( lo... |
public class JoinNode { /** * Split a join tree into one or more sub - trees . Each sub - tree has the same join type
* for all join nodes . The root of the child tree in the parent tree is replaced with a ' dummy ' node
* which id is negated id of the child root node .
* @ param tree - The join tree
* @ return... | List < JoinNode > subTrees = new ArrayList < > ( ) ; // Extract the first sub - tree starting at the root
subTrees . add ( this ) ; List < JoinNode > leafNodes = new ArrayList < > ( ) ; extractSubTree ( leafNodes ) ; // Continue with the leafs
for ( JoinNode leaf : leafNodes ) { subTrees . addAll ( leaf . extractSubTre... |
public class PDBDomainProvider { /** * Gets a list of all domain representatives */
@ Override public SortedSet < String > getRepresentativeDomains ( ) { } } | String url = base + "representativeDomains?cluster=" + cutoff ; return requestRepresentativeDomains ( url ) ; |
public class GroovyRuntimeImpl { /** * Creates a { @ link GroovyResourceLoader } from a { @ link ResourceLoader } . */
public GroovyResourceLoader createGroovyResourceLoader ( final ResourceLoader resourceLoader ) { } } | checkNotNull ( resourceLoader ) ; return new GroovyResourceLoader ( ) { @ Override public URL loadGroovySource ( final String name ) throws MalformedURLException { return resourceLoader . loadResource ( name ) ; } } ; |
public class IsaTranslations { /** * FIXME Unhack invariant extraction for namedt ypes */
public String hackInv ( ARecordDeclIR type ) { } } | if ( type . getInvariant ( ) != null ) { AFuncDeclIR invFunc = ( AFuncDeclIR ) type . getInvariant ( ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( "inv " ) ; sb . append ( invFunc . getFormalParams ( ) . get ( 0 ) . getPattern ( ) . toString ( ) ) ; sb . append ( " == " ) ; sb . append ( invFunc . getNam... |
public class Http2ServerUpgradeCodec { /** * Creates an HTTP2 - Settings header with the given payload . The payload buffer is released . */
private static ByteBuf createSettingsFrame ( ChannelHandlerContext ctx , ByteBuf payload ) { } } | ByteBuf frame = ctx . alloc ( ) . buffer ( FRAME_HEADER_LENGTH + payload . readableBytes ( ) ) ; writeFrameHeader ( frame , payload . readableBytes ( ) , SETTINGS , new Http2Flags ( ) , 0 ) ; frame . writeBytes ( payload ) ; payload . release ( ) ; return frame ; |
public class CmsContextMenuWidget { /** * Adds new item as context menu root item . < p >
* @ param rootItem the root item
* @ param connector the connector */
public void addRootMenuItem ( ContextMenuItemState rootItem , CmsContextMenuConnector connector ) { } } | CmsContextMenuItemWidget itemWidget = createEmptyItemWidget ( rootItem . getId ( ) , rootItem . getCaption ( ) , rootItem . getDescription ( ) , connector ) ; itemWidget . setEnabled ( rootItem . isEnabled ( ) ) ; itemWidget . setSeparatorVisible ( rootItem . isSeparator ( ) ) ; setStyleNames ( itemWidget , rootItem . ... |
public class TypeMaker { /** * Return the formal type parameters of a class or method as an
* angle - bracketed string . Each parameter is a type variable with
* optional bounds . Class names are qualified if " full " is true .
* Return " " if there are no type parameters or we ' re hiding generics . */
static St... | if ( env . legacyDoclet || sym . type . getTypeArguments ( ) . isEmpty ( ) ) { return "" ; } StringBuilder s = new StringBuilder ( ) ; for ( Type t : sym . type . getTypeArguments ( ) ) { s . append ( s . length ( ) == 0 ? "<" : ", " ) ; s . append ( TypeVariableImpl . typeVarToString ( env , ( TypeVar ) t , full ) ) ;... |
public class Configuration { /** * Get the value of the < code > name < / code > property as a < code > boolean < / code > .
* If no such property is specified , or if the specified value is not a valid
* < code > boolean < / code > , then < code > defaultValue < / code > is returned .
* @ param name property nam... | String valueString = get ( name ) ; return "true" . equals ( valueString ) || ! "false" . equals ( valueString ) && defaultValue ; |
public class LegacyHyperionClient { /** * { @ inheritDoc } */
@ Override public < T extends ApiObject > EntityResponse < T > query ( Request < T > request ) { } } | LegacyEntityResponse < T > legacyResponse = executeRequest ( request , objectMapper . getTypeFactory ( ) . constructParametrizedType ( LegacyEntityResponse . class , LegacyEntityResponse . class , request . getEntityType ( ) ) ) ; EntityResponse < T > response = new EntityResponse < T > ( ) ; response . setEntries ( le... |
public class CheckAccessControls { /** * Checks the given NAME node to ensure that access restrictions are obeyed . */
private void checkNameDeprecation ( NodeTraversal t , Node n ) { } } | if ( ! n . isName ( ) ) { return ; } if ( ! shouldEmitDeprecationWarning ( t , n ) ) { return ; } Var var = t . getScope ( ) . getVar ( n . getString ( ) ) ; JSDocInfo docInfo = var == null ? null : var . getJSDocInfo ( ) ; if ( docInfo != null && docInfo . isDeprecated ( ) ) { if ( docInfo . getDeprecationReason ( ) !... |
public class EventManager { /** * Register an event handler . The registration looks at the interfaces
* that the handler implements . An entry is created in the event handler
* map for each event interface that is implemented .
* Event interfaces are named in the form [ Category ] Event ( e . g . ProductEvent ) ... | boolean validClass = false ; if ( handler == null ) { throw new IllegalArgumentException ( "Null handler class" ) ; } // Get the implemented interfaces . This gets only the
// directly implemented interfaces
Class < ? > clazz = handler . getClass ( ) ; Class < ? > interfaces [ ] = clazz . getInterfaces ( ) ; for ( int ... |
public class Text { /** * Same as { @ link # getName ( String ) } but adding the possibility to pass paths that end with a
* trailing ' / '
* @ see # getName ( String ) */
public static String getName ( String path , boolean ignoreTrailingSlash ) { } } | if ( ignoreTrailingSlash && path . endsWith ( "/" ) && path . length ( ) > 1 ) { path = path . substring ( 0 , path . length ( ) - 1 ) ; } return getName ( path ) ; |
public class WDefinitionListExample { /** * Adds some items to a definition list .
* @ param list the list to add the items to . */
private void addListItems ( final WDefinitionList list ) { } } | // Example of adding multiple data items at once .
list . addTerm ( "Colours" , new WText ( "Red" ) , new WText ( "Green" ) , new WText ( "Blue" ) ) ; // Example of adding multiple data items using multiple calls .
list . addTerm ( "Shapes" , new WText ( "Circle" ) ) ; list . addTerm ( "Shapes" , new WText ( "Square" )... |
public class CDIRuntimeImpl { /** * If we are deploying a WAR file ( which gets wrapped into a synthetic EAR by WAS )
* we need to take the webapp classloader , because the surrounding EAR class loader
* actually doesn ' t even contain a single class . . . */
public ClassLoader getRealAppClassLoader ( Application a... | try { List < CDIArchive > moduleArchives = new ArrayList < CDIArchive > ( application . getModuleArchives ( ) ) ; if ( moduleArchives . isEmpty ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , Util . identity ( this ) , "Application {0} has no modules so no thread c... |
public class BeanMappingFactoryHelper { /** * カラム番号が重複しているかチェックする 。 また 、 番号が1以上かもチェックする 。
* @ param beanType Beanタイプ
* @ param list カラム情報の一覧
* @ return チェック済みの番号
* @ throws SuperCsvInvalidAnnotationException { @ link CsvColumn } の定義が間違っている場合 */
public static TreeSet < Integer > validateDuplicatedColumnNumbe... | final TreeSet < Integer > checkedNumber = new TreeSet < > ( ) ; final TreeSet < Integer > duplicatedNumbers = new TreeSet < > ( ) ; for ( ColumnMapping columnMapping : list ) { if ( checkedNumber . contains ( columnMapping . getNumber ( ) ) ) { duplicatedNumbers . add ( columnMapping . getNumber ( ) ) ; } checkedNumber... |
public class PropertyAccessors { /** * < p > getAnnotation < / p >
* @ param annotation a { @ link java . lang . String } object .
* @ param < T > the type
* @ return a { @ link com . google . gwt . thirdparty . guava . common . base . Optional } object . */
public < T extends Annotation > Optional < T > getAnnot... | return CreatorUtils . getAnnotation ( annotation , accessors ) ; |
public class MetadataClient { /** * Removes the workflow definition of a workflow from the conductor server .
* It does not remove associated workflows . Use with caution .
* @ param name Name of the workflow to be unregistered .
* @ param version Version of the workflow definition to be unregistered . */
public ... | Preconditions . checkArgument ( StringUtils . isNotBlank ( name ) , "Workflow name cannot be blank" ) ; Preconditions . checkNotNull ( version , "Version cannot be null" ) ; delete ( "metadata/workflow/{name}/{version}" , name , version ) ; |
public class TimeCategory { /** * Get the DST offset ( if any ) for the default locale and the given date .
* @ param self a Date
* @ return the DST offset as a Duration . */
public static Duration getDaylightSavingsOffset ( Date self ) { } } | TimeZone timeZone = getTimeZone ( self ) ; int millis = ( timeZone . useDaylightTime ( ) && timeZone . inDaylightTime ( self ) ) ? timeZone . getDSTSavings ( ) : 0 ; return new TimeDuration ( 0 , 0 , 0 , millis ) ; |
public class AdaptiveGrid { /** * Returns a random hypercube that has more than zero solutions .
* @ param randomGenerator the { @ link BoundedRandomGenerator } to use for selecting the hypercube
* @ return The hypercube . */
public int randomOccupiedHypercube ( BoundedRandomGenerator < Integer > randomGenerator ) ... | int rand = randomGenerator . getRandomValue ( 0 , occupied . length - 1 ) ; return occupied [ rand ] ; |
public class SpaceAPI { /** * Returns the space and organization with the given full URL .
* @ param url
* The full URL of the space
* @ return The space with organization */
public SpaceWithOrganization getSpaceByURL ( String url ) { } } | return getResourceFactory ( ) . getApiResource ( "/space/url" ) . queryParam ( "url" , url ) . get ( SpaceWithOrganization . class ) ; |
public class QueryParametersLazyList { /** * Reads cached values from { @ link # generatedCacheMap } ( first ) and { @ link # resultSetCacheMap } ( second ) .
* @ param index row index which should be read
* @ return value from cache , or null if it is not present in cache . */
private QueryParameters readCachedVal... | QueryParameters result = null ; if ( generatedCacheMap . containsKey ( index ) == true ) { result = generatedCacheMap . get ( index ) ; } else if ( resultSetCacheMap . containsKey ( index ) == true ) { result = resultSetCacheMap . get ( index ) ; } return result ; |
public class UnconditionalValueDerefAnalysis { /** * Return a duplicate of given dataflow fact .
* @ param fact
* a dataflow fact
* @ return a duplicate of the input dataflow fact */
private UnconditionalValueDerefSet duplicateFact ( UnconditionalValueDerefSet fact ) { } } | UnconditionalValueDerefSet copyOfFact = createFact ( ) ; copy ( fact , copyOfFact ) ; fact = copyOfFact ; return fact ; |
public class ShippingInclusionRuleUrl { /** * Get Resource Url for GetShippingInclusionRules
* @ param profilecode The unique , user - defined code of the profile with which the shipping inclusion rule is associated .
* @ param responseFields Filtering syntax appended to an API call to increase or decrease the amou... | UrlFormatter formatter = new UrlFormatter ( "/api/commerce/shipping/admin/profiles/{profilecode}/rules/shippinginclusions?responseFields={responseFields}" ) ; formatter . formatUrl ( "profilecode" , profilecode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( formatter . getResourc... |
public class FlowControllerFactory { /** * Create a page flow of the given type . The page flow stack ( for nesting ) will be cleared or pushed , and the new
* instance will be stored as the current page flow .
* @ deprecated Use { @ link # createPageFlow ( RequestContext , String ) } instead .
* @ param request ... | try { return get ( servletContext ) . createPageFlow ( new RequestContext ( request , response ) , pageFlowClassName ) ; } catch ( ClassNotFoundException e ) { LOG . error ( "Requested page flow class " + pageFlowClassName + " not found." ) ; return null ; } catch ( InstantiationException e ) { LOG . error ( "Could not... |
public class AbstractSessionManager { public Cookie getSessionCookie ( HttpSession session , boolean requestIsSecure ) { } } | if ( _handler . isUsingCookies ( ) ) { Cookie cookie = _handler . getSessionManager ( ) . getHttpOnly ( ) ? new HttpOnlyCookie ( SessionManager . __SessionCookie , session . getId ( ) ) : new Cookie ( SessionManager . __SessionCookie , session . getId ( ) ) ; String domain = _handler . getServletContext ( ) . getInitPa... |
public class ApiOvhDedicatednasha { /** * Schedule a new snapshot type
* REST : POST / dedicated / nasha / { serviceName } / partition / { partitionName } / snapshot
* @ param snapshotType [ required ] Snapshot interval to add
* @ param serviceName [ required ] The internal name of your storage
* @ param partit... | String qPath = "/dedicated/nasha/{serviceName}/partition/{partitionName}/snapshot" ; StringBuilder sb = path ( qPath , serviceName , partitionName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "snapshotType" , snapshotType ) ; String resp = exec ( qPath , "POST" , sb . toString... |
public class AnalysisRunnerJobDelegate { /** * Starts row processing job flows .
* @ param publishers
* @ param analysisJobMetrics
* @ param injectionManager */
private void scheduleRowProcessing ( RowProcessingPublishers publishers , LifeCycleHelper lifeCycleHelper , JobCompletionTaskListener jobCompletionTaskLi... | logger . info ( "Created {} row processor publishers" , publishers . size ( ) ) ; final List < TaskRunnable > finalTasks = new ArrayList < TaskRunnable > ( 2 ) ; finalTasks . add ( new TaskRunnable ( null , jobCompletionTaskListener ) ) ; finalTasks . add ( new TaskRunnable ( null , new CloseReferenceDataTaskListener (... |
public class SyncClientHelpers { /** * Sends a single message synchronously , and blocks until the responses is received .
* NOTE : the underlying transport may be non - blocking , in which case the blocking is simulated
* by waits instead of using blocking network operations .
* @ param request
* @ return The ... | final ChannelBuffer [ ] responseHolder = new ChannelBuffer [ 1 ] ; final TException [ ] exceptionHolder = new TException [ 1 ] ; final CountDownLatch latch = new CountDownLatch ( 1 ) ; responseHolder [ 0 ] = null ; exceptionHolder [ 0 ] = null ; channel . sendAsynchronousRequest ( request , false , new RequestChannel .... |
public class GatewayConfigParser { /** * Count the number of new lines
* @ param ch
* @ param start
* @ param length */
private static int countNewLines ( char [ ] ch , int start , int length ) { } } | int newLineCount = 0 ; // quite reliable , since only Commodore 8 - bit machines , TRS - 80 , Apple II family , Mac OS up to version 9 and OS - 9
// use only ' \ r '
for ( int i = start ; i < length ; i ++ ) { newLineCount = newLineCount + ( ( ch [ i ] == '\n' ) ? 1 : 0 ) ; } return newLineCount ; |
public class ModuleInitDataFactory { /** * Return the ManagedBean name to be used internally by the EJBContainer .
* The internal ManagedBean name is the value on the annotation ( which
* must be unique even compared to EJBs in the module ) or the class name
* of the ManagedBean with a $ prefix . This is done for... | String name = getStringValue ( managedBeanAnn , "value" ) ; if ( name == null ) { name = '$' + classInfo . getName ( ) ; } return name ; |
public class CmsResourceTypeApp { /** * Is the given resource type id free ?
* @ param id to be checked
* @ return boolean */
public static boolean isResourceTypeIdFree ( int id ) { } } | try { OpenCms . getResourceManager ( ) . getResourceType ( id ) ; } catch ( CmsLoaderException e ) { return true ; } return false ; |
public class PhotosInterface { /** * Request an image from the Flickr - servers . < br >
* Callers must close the stream upon completion .
* At { @ link Size } you can find constants for the available sizes .
* @ param photo
* A photo - object
* @ param size
* The Size
* @ return InputStream The InputStre... | try { String urlStr = "" ; if ( size == Size . SQUARE ) { urlStr = photo . getSmallSquareUrl ( ) ; } else if ( size == Size . THUMB ) { urlStr = photo . getThumbnailUrl ( ) ; } else if ( size == Size . SMALL ) { urlStr = photo . getSmallUrl ( ) ; } else if ( size == Size . MEDIUM ) { urlStr = photo . getMediumUrl ( ) ;... |
public class AbstractTreebankLanguagePack { /** * Returns the syntactic category and ' function ' of a String .
* This normally involves truncating numerical coindexation
* showing coreference , etc . By ' function ' , this means
* keeping , say , Penn Treebank functional tags or ICE phrasal functions ,
* perha... | if ( category == null ) { return null ; } String catFunc = category ; int i = lastIndexOfNumericTag ( catFunc ) ; while ( i >= 0 ) { catFunc = catFunc . substring ( 0 , i ) ; i = lastIndexOfNumericTag ( catFunc ) ; } return catFunc ; |
public class JMPath { /** * Apply sub file paths and get applied list list .
* @ param < R > the type parameter
* @ param startDirectoryPath the start directory path
* @ param maxDepth the max depth
* @ param filter the filter
* @ param function the function
* @ param isParallel the is parallel
* @ return... | return applyPathListAndGetResultList ( isParallel , getSubFilePathList ( startDirectoryPath , maxDepth , filter ) , function ) ; |
public class ConcurrentTaskScheduler { /** * { @ inheritDoc }
* @ see org . audit4j . core . schedule . TaskScheduler # scheduleAtFixedRate ( java . lang . Runnable ,
* long ) */
@ Override public ScheduledFuture < ? > scheduleAtFixedRate ( Runnable task , long period ) { } } | try { return this . scheduledExecutor . scheduleAtFixedRate ( decorateTask ( task , true ) , 0 , period , TimeUnit . MILLISECONDS ) ; } catch ( RejectedExecutionException ex ) { throw new TaskRejectedException ( "Executor [" + this . scheduledExecutor + "] did not accept task: " + task , ex ) ; } |
public class ReservoirItemsSketch { /** * Returns a sketch instance of this class from the given srcMem ,
* which must be a Memory representation of this sketch class .
* @ param < T > The type of item this sketch contains
* @ param srcMem a Memory representation of a sketch of this class .
* < a href = " { @ d... | Family . RESERVOIR . checkFamilyID ( srcMem . getByte ( FAMILY_BYTE ) ) ; final int numPreLongs = extractPreLongs ( srcMem ) ; final ResizeFactor rf = ResizeFactor . getRF ( extractResizeFactor ( srcMem ) ) ; final int serVer = extractSerVer ( srcMem ) ; final boolean isEmpty = ( extractFlags ( srcMem ) & EMPTY_FLAG_MA... |
public class FilesystemUtil { /** * Set the 755 permissions on the given script .
* @ param config - the instance config
* @ param scriptName - the name of the script ( located in the bin directory ) to make executable */
public static void setScriptPermission ( InstanceConfiguration config , String scriptName ) { ... | if ( SystemUtils . IS_OS_WINDOWS ) { // we do not have file permissions on windows
return ; } if ( VersionUtil . isEqualOrGreater_7_0_0 ( config . getClusterConfiguration ( ) . getVersion ( ) ) ) { // ES7 and above is packaged as a . tar . gz , and as such the permissions are preserved
return ; } CommandLine command = ... |
public class Email { /** * Adds an attachment to the email message and generates the necessary { @ link DataSource } with the given byte data .
* Then delegates to { @ link # addAttachment ( String , DataSource ) } . At this point the datasource is actually a
* { @ link ByteArrayDataSource } .
* @ param name The ... | final ByteArrayDataSource dataSource = new ByteArrayDataSource ( data , mimetype ) ; dataSource . setName ( name ) ; addAttachment ( name , dataSource ) ; |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcWindowLiningProperties ( ) { } } | if ( ifcWindowLiningPropertiesEClass == null ) { ifcWindowLiningPropertiesEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 646 ) ; } return ifcWindowLiningPropertiesEClass ; |
public class BmrClient { /** * Modify the instance groups of the target cluster .
* @ param request The request containing the ID of BMR cluster and the instance groups to be modified . */
public void modifyInstanceGroups ( ModifyInstanceGroupsRequest request ) { } } | checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getClusterId ( ) , "The clusterId should not be null or empty string." ) ; checkNotNull ( request . getInstanceGroups ( ) , "The instanceGroups should not be null." ) ; StringWriter writer = new StringWriter ( ) ; try { JsonGener... |
public class AdBrokerBenchmark { /** * Print stats for the last displayinterval seconds to the console . */
public synchronized void printStatistics ( ) { } } | ClientStats stats = m_periodicStatsContext . fetchAndResetBaseline ( ) . getStats ( ) ; long time = Math . round ( ( stats . getEndTimestamp ( ) - m_benchmarkStartTS ) / 1000.0 ) ; System . out . printf ( "%02d:%02d:%02d " , time / 3600 , ( time / 60 ) % 60 , time % 60 ) ; System . out . printf ( "Throughput %d/s, " , ... |
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public ColorFidelityRepCoEx createColorFidelityRepCoExFromString ( EDataType eDataType , String initialValue ) { } } | ColorFidelityRepCoEx result = ColorFidelityRepCoEx . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ; |
public class PipelineSqlMapDao { /** * This is only used in test for legacy purpose . Please call pipelineService . save ( aPipeline ) instead .
* This is particularly bad as it does NOT do the same as what the system does in the real code .
* In particular it does not save the JobInstances correctly . We need to r... | updateCounter ( pipeline ) ; Pipeline savedPipeline = save ( pipeline ) ; for ( Stage stage : pipeline . getStages ( ) ) { stageDao . saveWithJobs ( savedPipeline , stage ) ; } return savedPipeline ; |
public class InternalPureXbaseLexer { /** * $ ANTLR start " T _ _ 68" */
public final void mT__68 ( ) throws RecognitionException { } } | try { int _type = T__68 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // InternalPureXbase . g : 66:7 : ( ' do ' )
// InternalPureXbase . g : 66:9 : ' do '
{ match ( "do" ) ; } state . type = _type ; state . channel = _channel ; } finally { } |
public class SimpleRepository { /** * Executes the supplied read - write operation . In the event of a transient failure , the
* repository will attempt to reestablish the database connection and try the operation again .
* @ return whatever value is returned by the invoked operation . */
protected < V > V executeU... | return execute ( op , true , false ) ; |
public class MatrixIO { /** * Returns an iterator over the matrix entries in the data file . For sparse
* formats that specify only non - zero , no zero valued entries will be
* returened . Conversely , for dense matrix formats , all of the entries ,
* including zero entries will be returned .
* @ param matrixF... | switch ( fileFormat ) { case DENSE_TEXT : return new DenseTextFileIterator ( matrixFile ) ; case SVDLIBC_SPARSE_BINARY : return new SvdlibcSparseBinaryFileIterator ( matrixFile ) ; case SVDLIBC_SPARSE_TEXT : return new SvdlibcSparseTextFileIterator ( matrixFile ) ; case SVDLIBC_DENSE_BINARY : return new SvdlibcDenseBin... |
public class ThreadContext { /** * 设置做分表分库的切分的key
* @ param shardKey 下午8:37:51 created by Darwin ( Tianxin ) */
public final static < K extends Serializable , U extends BaseObject < K > > void putSessionVisitor ( U sessionVisitor ) { } } | putContext ( VISITOR_KEY , sessionVisitor ) ; |
public class GVRPeriodicEngine { /** * Run a task periodically , for a set number of times .
* @ param task
* Task to run .
* @ param delay
* The first execution will happen in { @ code delay } seconds .
* @ param period
* Subsequent executions will happen every { @ code period } seconds
* after the first... | if ( repetitions < 1 ) { return null ; } else if ( repetitions == 1 ) { // Better to burn a handful of CPU cycles than to churn memory by
// creating a new callback
return runAfter ( task , delay ) ; } else { return runEvery ( task , delay , period , new RunFor ( repetitions ) ) ; } |
public class DebugUtils { /** * Prettifies the { @ link Object # toString ( ) } output generated by IntelliJ .
* @ param object The object to print
* @ param indentation The number of blanks on a new line
* @ return The toString representation with line breaks and indentations */
public static String prettyToStri... | final String string = object . toString ( ) ; // position of new lines and number of intending spaces
final Map < Integer , Integer > newLines = new TreeMap < > ( ) ; int currentLevel = 0 ; boolean inStringLiteral = false ; for ( int i = 0 ; i < string . length ( ) ; i ++ ) { final char currentChar = string . charAt ( ... |
public class AbstractBrowsableResourceFactory { /** * This method { @ link # createBrowsableResource ( String ) creates } the actual raw { @ link BrowsableResource } .
* @ param resourceUri is the parsed and qualified { @ link ResourceUriImpl } .
* @ return the created { @ link BrowsableResource } .
* @ throws Re... | DataResourceProvider < ? extends DataResource > provider = getProvider ( resourceUri ) ; if ( ! BrowsableResource . class . isAssignableFrom ( provider . getResourceType ( ) ) ) { Exception cause = new IllegalArgumentException ( provider . getResourceType ( ) . getSimpleName ( ) ) ; throw new ResourceUriUndefinedExcept... |
public class Utils { /** * Obtains the data to store in file for a double number
* @ param num number to convert
* @ param characterSetName charset to use ( ignored )
* @ param fieldLength field size
* @ param sizeDecimalPart sizeDecimalPart
* @ return byte [ ] to store in the file
* @ throws UnsupportedEnc... | return doubleFormating ( num . doubleValue ( ) , characterSetName , fieldLength , sizeDecimalPart ) ; |
public class NonBlockingBufferedReader { /** * Reads characters into a portion of an array .
* This method implements the general contract of the corresponding
* < code > { @ link Reader # read ( char [ ] , int , int ) read } < / code > method of the
* < code > { @ link Reader } < / code > class . As an additiona... | _ensureOpen ( ) ; ValueEnforcer . isArrayOfsLen ( cbuf , nOfs , nLen ) ; if ( nLen == 0 ) return 0 ; // Main read
int n = _internalRead ( cbuf , nOfs , nLen ) ; if ( n <= 0 ) return n ; while ( n < nLen && m_aReader . ready ( ) ) { final int n1 = _internalRead ( cbuf , nOfs + n , nLen - n ) ; if ( n1 <= 0 ) break ; n +... |
public class ActionStatusBeanQuery { /** * Creates a list of { @ link ProxyActionStatus } for presentation layer from
* page of { @ link ActionStatus } .
* @ param actionBeans
* page of { @ link ActionStatus }
* @ return list of { @ link ProxyActionStatus } */
private static List < ProxyActionStatus > createPro... | final List < ProxyActionStatus > proxyActionStates = new ArrayList < > ( ) ; for ( final ActionStatus actionStatus : actionStatusBeans ) { final ProxyActionStatus proxyAS = new ProxyActionStatus ( ) ; proxyAS . setCreatedAt ( actionStatus . getCreatedAt ( ) ) ; proxyAS . setStatus ( actionStatus . getStatus ( ) ) ; pro... |
public class ResolvedTypes { /** * / * @ Nullable */
@ Override public LightweightTypeReference getReturnType ( XExpression expression , boolean onlyExplicitReturns ) { } } | LightweightTypeReference result = doGetReturnType ( expression , onlyExplicitReturns ) ; return toOwnedReference ( result ) ; |
public class ChatScreen { /** * Process this action .
* @ param strAction The action to process .
* By default , this method handles RESET , SUBMIT , and DELETE . */
public boolean doAction ( String strAction , int iOptions ) { } } | if ( SEND . equalsIgnoreCase ( strAction ) ) { String strMessage = m_tfTextIn . getText ( ) ; m_tfTextIn . setText ( Constants . BLANK ) ; Map < String , Object > properties = new Hashtable < String , Object > ( ) ; properties . put ( MESSAGE_PARAM , strMessage ) ; BaseMessage message = new MapMessage ( new BaseMessage... |
public class HtmlTool { /** * Replaces elements in HTML .
* @ param content
* HTML content to modify
* @ param selector
* CSS selector for elements to replace
* @ param replacement
* HTML replacement ( must parse to a single element )
* @ return HTML content with replaced elements . If no elements are fou... | return replaceAll ( content , Collections . singletonMap ( selector , replacement ) ) ; |
public class RxApollo { /** * Converts an { @ link ApolloCall } to a Observable with backpressure mode { @ link rx . Emitter . BackpressureMode # BUFFER } .
* The number of emissions this Observable will have is based on the { @ link ResponseFetcher } used with the call .
* @ param call the ApolloCall to convert
... | return from ( call , Emitter . BackpressureMode . BUFFER ) ; |
public class Symbol { /** * < p > Sets the type of input data . This setting influences what pre - processing is done on
* data before encoding in the symbol . For example : for < code > GS1 < / code > mode the AI
* data will be used to calculate the position of ' FNC1 ' characters .
* < p > Valid values are :
... | if ( dataType == DataType . GS1 && ! gs1Supported ( ) ) { throw new IllegalArgumentException ( "This symbology type does not support GS1 data." ) ; } inputDataType = dataType ; |
public class CmsSolrQuery { /** * Adds the given fields / orders to the existing sort fields . < p >
* @ param sortFields the sortFields to set */
public void addSortFieldOrders ( Map < String , ORDER > sortFields ) { } } | if ( ( sortFields != null ) && ! sortFields . isEmpty ( ) ) { // add the sort fields to the query
for ( Map . Entry < String , ORDER > entry : sortFields . entrySet ( ) ) { addSort ( entry . getKey ( ) , entry . getValue ( ) ) ; } } |
public class Role { /** * Method to initialize the Cache of this CacheObjectInterface . */
public static void initialize ( ) { } } | if ( InfinispanCache . get ( ) . exists ( Role . UUIDCACHE ) ) { InfinispanCache . get ( ) . < UUID , Role > getCache ( Role . UUIDCACHE ) . clear ( ) ; } else { InfinispanCache . get ( ) . < UUID , Role > getCache ( Role . UUIDCACHE ) . addListener ( new CacheLogListener ( Role . LOG ) ) ; } if ( InfinispanCache . get... |
public class GVRFrustumPicker { /** * Set the view frustum to pick against from the given projection matrix .
* If the projection matrix is null , the picker will revert to picking
* objects that are visible from the viewpoint of the scene ' s current camera .
* If a matrix is given , the picker will pick objects... | if ( projMatrix != null ) { if ( mProjMatrix == null ) { mProjMatrix = new float [ 16 ] ; } mProjMatrix = projMatrix . get ( mProjMatrix , 0 ) ; mScene . setPickVisible ( false ) ; if ( mCuller != null ) { mCuller . set ( projMatrix ) ; } else { mCuller = new FrustumIntersection ( projMatrix ) ; } } mProjection = projM... |
public class SSLEngineImpl { /** * We ' ve got a fatal error here , so start the shutdown process .
* Because of the way the code was written , we have some code
* calling fatal directly when the " description " is known
* and some throwing Exceptions which are then caught by higher
* levels which then call her... | /* * If we have no further information , make a general - purpose
* message for folks to see . We generally have one or the other . */
if ( diagnostic == null ) { diagnostic = "General SSLEngine problem" ; } if ( cause == null ) { cause = Alerts . getSSLException ( description , cause , diagnostic ) ; } /* * If we ' ... |
public class FlowConfigResourceLocalHandler { /** * Add flowConfig locally and trigger all listeners iff @ param triggerListener is set to true */
public CreateResponse createFlowConfig ( FlowConfig flowConfig , boolean triggerListener ) throws FlowConfigLoggedException { } } | log . info ( "[GAAS-REST] Create called with flowGroup " + flowConfig . getId ( ) . getFlowGroup ( ) + " flowName " + flowConfig . getId ( ) . getFlowName ( ) ) ; if ( flowConfig . hasExplain ( ) ) { // Return Error if FlowConfig has explain set . Explain request is only valid for v2 FlowConfig .
return new CreateRespo... |
public class DebugAndFilterModule { /** * Check if path falls outside start document directory
* @ param filePathName absolute path to test
* @ param inputMap absolute input map path
* @ return { @ code true } if outside start directory , otherwise { @ code false } */
private static boolean isOutFile ( final File... | final File relativePath = FileUtils . getRelativePath ( inputMap . getAbsoluteFile ( ) , filePathName . getAbsoluteFile ( ) ) ; return ! ( relativePath . getPath ( ) . length ( ) == 0 || ! relativePath . getPath ( ) . startsWith ( ".." ) ) ; |
public class ClusteringVisualTab { /** * This method is called from within the constructor to
* initialize the form .
* WARNING : Do NOT modify this code . The content of this method is
* always regenerated by the Form Editor . */
@ SuppressWarnings ( "unchecked" ) // < editor - fold defaultstate = " collapsed " ... | java . awt . GridBagConstraints gridBagConstraints ; jSplitPane1 = new javax . swing . JSplitPane ( ) ; topWrapper = new javax . swing . JPanel ( ) ; panelVisualWrapper = new javax . swing . JPanel ( ) ; splitVisual = new javax . swing . JSplitPane ( ) ; scrollPane1 = new javax . swing . JScrollPane ( ) ; streamPanel1 ... |
public class TaskLockbox { /** * Return all locks that overlap some search interval . */
private List < TaskLockPosse > findLockPossesOverlapsInterval ( final String dataSource , final Interval interval ) { } } | giant . lock ( ) ; try { final NavigableMap < DateTime , SortedMap < Interval , List < TaskLockPosse > > > dsRunning = running . get ( dataSource ) ; if ( dsRunning == null ) { // No locks at all
return Collections . emptyList ( ) ; } else { // Tasks are indexed by locked interval , which are sorted by interval start .... |
public class RestService { /** * returns authenticated user cuid */
protected String getAuthUser ( Map < String , String > headers ) { } } | return headers . get ( Listener . AUTHENTICATED_USER_HEADER ) ; |
public class ServerContext { /** * Sets the global index .
* @ param globalIndex The global index .
* @ return The Raft context . */
ServerContext setGlobalIndex ( long globalIndex ) { } } | Assert . argNot ( globalIndex < 0 , "global index must be positive" ) ; this . globalIndex = Math . max ( this . globalIndex , globalIndex ) ; log . compactor ( ) . majorIndex ( this . globalIndex - 1 ) ; return this ; |
public class OutputMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Output output , ProtocolMarshaller protocolMarshaller ) { } } | if ( output == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( output . getAudioDescriptionNames ( ) , AUDIODESCRIPTIONNAMES_BINDING ) ; protocolMarshaller . marshall ( output . getCaptionDescriptionNames ( ) , CAPTIONDESCRIPTIONNAMES_BINDIN... |
public class Record { /** * Converts a Record into canonical DNS uncompressed wire format ( all names are
* converted to lowercase ) , optionally ignoring the TTL . */
private byte [ ] toWireCanonical ( boolean noTTL ) { } } | DNSOutput out = new DNSOutput ( ) ; toWireCanonical ( out , noTTL ) ; return out . toByteArray ( ) ; |
public class SignedBytes { /** * Returns the least value present in { @ code array } .
* @ param array a < i > nonempty < / i > array of { @ code byte } values
* @ return the value present in { @ code array } that is less than or equal to every other value in
* the array
* @ throws IllegalArgumentException if {... | checkArgument ( array . length > 0 ) ; byte min = array [ 0 ] ; for ( int i = 1 ; i < array . length ; i ++ ) { if ( array [ i ] < min ) { min = array [ i ] ; } } return min ; |
public class QueryUtil { /** * Checks if the given expression has any wildcard characters
* @ param expression a { @ code String } value , never { @ code null }
* @ return true if the expression has wildcard characters , false otherwise */
public static boolean hasWildcardCharacters ( String expression ) { } } | Objects . requireNonNull ( expression ) ; CharacterIterator iter = new StringCharacterIterator ( expression ) ; boolean skipNext = false ; for ( char c = iter . first ( ) ; c != CharacterIterator . DONE ; c = iter . next ( ) ) { if ( skipNext ) { skipNext = false ; continue ; } if ( c == '*' || c == '?' || c == '%' || ... |
public class AtomicServiceReference { /** * Clear the service reference associated with this service . This first
* checks to see whether or not the reference being unset matches the
* current reference . For Declarative Services dynamic components : if a replacement
* is available for a dynamic reference , DS wi... | ReferenceTuple < T > previous = null ; ReferenceTuple < T > newTuple = null ; // Try this until we either manage to make our update or we know we don ' t have to
do { // Get the current tuple
previous = tuple . get ( ) ; // If we have something to do . .
if ( reference == previous . serviceRef ) { newTuple = new Refere... |
public class StorageAccountCredentialsInner { /** * Creates or updates the storage account credential .
* @ param deviceName The device name .
* @ param name The storage account credential name .
* @ param resourceGroupName The resource group name .
* @ param storageAccountCredential The storage account credent... | return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( deviceName , name , resourceGroupName , storageAccountCredential ) , serviceCallback ) ; |
public class HpelSystemStream { /** * Print a boolean value . The string produced by
* < code > { @ link java . lang . String # valueOf ( boolean ) } < / code > is translated into
* bytes according to the platform ' s default character encoding , and these
* bytes are written in exactly the manner of the
* < co... | if ( ivSuppress == true ) return ; if ( x == false ) doPrint ( svFalse ) ; else doPrint ( svTrue ) ; |
public class AbstractWizardPanel { /** * Callback method for the previous action . */
protected void onPrevious ( ) { } } | stateMachine . previous ( ) ; updateButtonState ( ) ; final String name = getStateMachine ( ) . getCurrentState ( ) . getName ( ) ; final CardLayout cardLayout = getWizardContentPanel ( ) . getCardLayout ( ) ; cardLayout . show ( getWizardContentPanel ( ) , name ) ; |
public class Trapezoid { /** * Computes the membership function evaluated at ` x `
* @ param x
* @ return ` \ begin { cases } 0h & \ mbox { if $ x \ not \ in [ a , d ] $ } \ cr h \ times
* \ min ( 1 , ( x - a ) / ( b - a ) ) & \ mbox { if $ x < b $ } \ cr 1h & \ mbox { if $ x \ leq
* c $ } \ cr h ( d - x ) / ( ... | if ( Double . isNaN ( x ) ) { return Double . NaN ; } if ( Op . isLt ( x , vertexA ) || Op . isGt ( x , vertexD ) ) { return height * 0.0 ; } else if ( Op . isLt ( x , vertexB ) ) { return height * Math . min ( 1.0 , ( x - vertexA ) / ( vertexB - vertexA ) ) ; } else if ( Op . isLE ( x , vertexC ) ) { return height * 1... |
public class AVTrack { /** * Get the file where this track can be found ( or null if this information is not available )
* @ return */
public String getSource ( ) { } } | final Element element = getElement ( "Source" , 0 ) ; if ( element != null ) return element . getText ( ) ; else return null ; |
public class CmsInternalLinkValidationDialog { /** * Returns the list of VFS resources . < p >
* @ return the list of VFS resources */
public List getResources ( ) { } } | if ( ( m_resources == null ) || m_resources . isEmpty ( ) ) { m_resources = new ArrayList ( ) ; m_resources . add ( "/" ) ; } return m_resources ; |
public class LoadReportAnalysisMetadataHolderStep { /** * Check that the Quality profiles sent by scanner correctly relate to the project organization . */
private void checkQualityProfilesConsistency ( ScannerReport . Metadata metadata , Organization organization ) { } } | List < String > profileKeys = metadata . getQprofilesPerLanguage ( ) . values ( ) . stream ( ) . map ( QProfile :: getKey ) . collect ( toList ( metadata . getQprofilesPerLanguage ( ) . size ( ) ) ) ; try ( DbSession dbSession = dbClient . openSession ( false ) ) { List < QProfileDto > profiles = dbClient . qualityProf... |
public class AuthorizationInterceptors { /** * START SNIPPET : conditionalUpdate */
@ Update ( ) public MethodOutcome update ( @ IdParam IdDt theId , @ ResourceParam Patient theResource , @ ConditionalUrlParam String theConditionalUrl , ServletRequestDetails theRequestDetails , IInterceptorBroadcaster theInterceptorBro... | // If we ' re processing a conditional URL . . .
if ( isNotBlank ( theConditionalUrl ) ) { // Pretend we ' ve done the conditional processing . Now let ' s
// notify the interceptors that an update has been performed
// and supply the actual ID that ' s being updated
IdDt actual = new IdDt ( "Patient" , "1123" ) ; } //... |
public class Director { /** * Gets the sample licenses from install resources
* @ param locale Locale of license
* @ return Collection of licenses as Strings for samples
* @ throws InstallException */
public Collection < String > getSampleLicense ( Locale locale ) throws InstallException { } } | Collection < String > licenses = new ArrayList < String > ( ) ; for ( List < List < RepositoryResource > > targetList : getResolveDirector ( ) . getInstallResources ( ) . values ( ) ) { for ( List < RepositoryResource > mrList : targetList ) { for ( RepositoryResource mr : mrList ) { ResourceType type = mr . getType ( ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.