signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ClusterInstance { /** * Tries to create a new slice on this instance . * @ param reqType * the type describing the hardware characteristics of the slice * @ param jobID * the ID of the job the new slice belongs to * @ return a new { @ AllocatedSlice } object if a slice with the given hardware cha...
// check whether we can accommodate the instance if ( remainingCapacity . getNumberOfComputeUnits ( ) >= reqType . getNumberOfComputeUnits ( ) && remainingCapacity . getNumberOfCores ( ) >= reqType . getNumberOfCores ( ) && remainingCapacity . getMemorySize ( ) >= reqType . getMemorySize ( ) && remainingCapacity . getD...
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcPropertySetTemplateTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class XsltPortalUrlProvider { /** * Get the portlet URL builder for the specified fname or layoutId ( fname takes precedence ) * @ param request * @ param portalUrlBuilder * @ param fname * @ param layoutId * @ param state * @ param mode * @ param copyCurrentRenderParameters * @ return * @ depr...
return this . getPortletUrlBuilder ( request , portalUrlBuilder , fname , layoutId , state , mode , copyCurrentRenderParameters , null ) ;
public class DynamicURLClassLoader { /** * Defines a new package by name in this ClassLoader . The attributes * contained in the specified Manifest will be used to obtain package * version and sealing information . For sealed packages , the additional * URL specifies the code source URL from which the package was...
final String path = name . replace ( '.' , '/' ) . concat ( "/" ) ; // $ NON - NLS - 1 $ String specTitle = null ; String specVersion = null ; String specVendor = null ; String implTitle = null ; String implVersion = null ; String implVendor = null ; String sealed = null ; URL sealBase = null ; Attributes attr = man . ...
public class PerformanceMonitorBeanFactory { /** * Create the initial { @ link PerformanceMonitorBean } instances . */ public void createInitialPerformanceMonitors ( ) { } }
if ( packageScanBase != null ) { AnnotatedMethodScanner methodScanner = new AnnotatedMethodScanner ( ) ; for ( Method m : methodScanner . findAnnotatedMethods ( packageScanBase , org . fishwife . jrugged . aspects . PerformanceMonitor . class ) ) { org . fishwife . jrugged . aspects . PerformanceMonitor performanceMoni...
public class TileCache { /** * Calculate the exact bounding box for a tile , given it ' s tile - code . * @ param tileCode * tile code * @ return bbox for tile */ protected Bbox calcBoundsForTileCode ( TileCode tileCode ) { } }
// Calculate tile width and height for tileLevel = tileCode . getTileLevel ( ) double div = Math . pow ( 2 , tileCode . getTileLevel ( ) ) ; double scale = layer . getMapModel ( ) . getMapView ( ) . getCurrentScale ( ) ; double tileWidth = Math . ceil ( ( scale * layerBounds . getWidth ( ) ) / div ) / scale ; double ti...
public class Table { /** * Add all the columns of tableToConcatenate to this table * Note : The columns in the result must have unique names , when compared case insensitive * Note : Both tables must have the same number of rows * @ param tableToConcatenate The table containing the columns to be added * @ retur...
Preconditions . checkArgument ( tableToConcatenate . rowCount ( ) == this . rowCount ( ) , "Both tables must have the same number of rows to concatenate them." ) ; for ( Column < ? > column : tableToConcatenate . columns ( ) ) { this . addColumns ( column ) ; } return this ;
public class CacheImpl { /** * { @ inheritDoc } */ @ Override public void put ( String scope , Object key , Object value , long expireAfter , long refreshFrequency , CacheLoader loader , Object ... loaderParams ) throws InvalidScopeException , InternalCacheEngineException { } }
if ( expireAfter < 0 ) { throw new IllegalArgumentException ( "The expireAfter argument should be 0 or positive" ) ; } if ( refreshFrequency < 0 ) { throw new IllegalArgumentException ( "The refreshFrequency argument should be 0 or positive" ) ; } if ( value instanceof CachingAwareObject ) { CachingAwareObject cachingA...
public class StandardRoadNetwork { /** * Add a road segment inside the road network . * @ param segment is the road segment to insert * @ return < code > true < / code > if segment successfully added , otherwise < code > false < / code > * @ throws RoadNetworkException in case of error . */ @ SuppressWarnings ( {...
"checkstyle:cyclomaticcomplexity" , "checkstyle:npathcomplexity" } ) public final boolean addRoadPolyline ( RoadPolyline segment ) throws RoadNetworkException { // Check element validity assert segment != null ; final RoadNetwork currentNetwork = segment . getRoadNetwork ( ) ; if ( currentNetwork == this ) { return fal...
public class AbstractViewQuery { /** * Set url for WebView or create a url link for Textview * @ param url * @ return */ public T url ( String url ) { } }
if ( view != null ) { if ( view instanceof WebView ) { ( ( WebView ) view ) . loadUrl ( url ) ; } if ( view instanceof TextView ) { ( ( TextView ) view ) . setAutoLinkMask ( Linkify . ALL ) ; text ( url ) ; } } return self ( ) ;
public class StringUtils { /** * Simple replacement for String . format ( ) , works only with % s but it ' s enough for logging or exceptions . * @ param format * A < a href = " . . / util / Formatter . html # syntax " > format string < / a > * @ param args * Arguments referenced by the format specifiers in the...
String retVal = format ; for ( final Object current : args ) { String argString = null ; try { argString = StringUtils . substring ( java . util . Objects . toString ( current ) , 0 , 256 ) ; retVal = retVal . replaceFirst ( "[%][sdf]" , argString ) ; } catch ( final Exception e ) { argString = "Ups" ; retVal = retVal ...
public class MultiChangeBuilder { /** * Inserts the given text at the position returned from * { @ code getAbsolutePosition ( paragraphIndex , columnPosition ) } . * < p > < b > Caution : < / b > see { @ link StyledDocument # getAbsolutePosition ( int , int ) } to know how the column index argument * can affect t...
int index = area . getAbsolutePosition ( paragraphIndex , columnPosition ) ; return replaceTextAbsolutely ( index , index , text ) ;
public class StackdriverStatsExporter { /** * Creates a Stackdriver Stats exporter with default Monitored Resource . * < p > Only one Stackdriver exporter can be created . * < p > This uses the default application credentials . See { @ link * GoogleCredentials # getApplicationDefault } . * < p > This uses the d...
checkNotNull ( exportInterval , "exportInterval" ) ; checkArgument ( ! DEFAULT_PROJECT_ID . isEmpty ( ) , "Cannot find a project ID from application default." ) ; createInternal ( null , DEFAULT_PROJECT_ID , exportInterval , DEFAULT_RESOURCE , null , DEFAULT_CONSTANT_LABELS ) ;
public class StreamManagerClient { /** * Build register request and send to stream mgr */ private void sendRegisterRequest ( ) { } }
StreamManager . RegisterInstanceRequest request = StreamManager . RegisterInstanceRequest . newBuilder ( ) . setInstance ( instance ) . setTopologyName ( topologyName ) . setTopologyId ( topologyId ) . build ( ) ; // The timeout would be the reconnect - interval - seconds sendRequest ( request , null , StreamManager . ...
public class PSBroker { /** * Forces subscribers to unsubscribe based on the given subscriber type and * message type . * @ param < S > * - The type of subscriber to unsubscribe from . * @ param < T > * - The type of the subscriber . * @ param subscriberType * - The type of subscriber that will be forced ...
return subscribeStrategy . unsubscribeByTypes ( mapping , subscriberType , messageType ) ;
public class CustomHeadersInterceptor { /** * Add all headers in a header multimap . * @ param headers a multimap of headers . * @ return the interceptor instance itself . */ public CustomHeadersInterceptor addHeaderMultimap ( Map < String , List < String > > headers ) { } }
this . headers . putAll ( headers ) ; return this ;
public class Matrix { /** * Returns C = A + B * @ param B * @ return new Matrix C * @ throws GeometryException if the matrix dimensions don ' t match */ public Matrix plus ( final Matrix B ) { } }
final Matrix A = this ; if ( ( B . m_rows != A . m_rows ) || ( B . m_columns != A . m_columns ) ) { throw new GeometryException ( "Illegal matrix dimensions" ) ; } final Matrix C = new Matrix ( m_rows , m_columns ) ; for ( int i = 0 ; i < m_rows ; i ++ ) { for ( int j = 0 ; j < m_columns ; j ++ ) { C . m_data [ i ] [ j...
public class DirectoryRegistrationService { /** * Register a ProvidedServiceInstance . * @ param serviceInstance * the ProvidedServiceInstance . */ public void registerService ( ProvidedServiceInstance serviceInstance ) { } }
getServiceDirectoryClient ( ) . registerServiceInstance ( serviceInstance ) ; getCacheServiceInstances ( ) . put ( new ServiceInstanceToken ( serviceInstance . getServiceName ( ) , serviceInstance . getProviderId ( ) ) , new InstanceHealthPair ( null ) ) ;
public class CmsInlineEditOverlay { /** * Sets button bar visibility . < p > * @ param visible < code > true < / code > to set the button bar visible */ private void setButtonBarVisible ( boolean visible ) { } }
if ( m_hasButtonBar != visible ) { m_hasButtonBar = visible ; if ( m_hasButtonBar ) { m_buttonBar . getStyle ( ) . clearDisplay ( ) ; int width = CmsClientStringUtil . parseInt ( m_borderTopStyle . getWidth ( ) ) + BUTTON_BAR_WIDTH ; m_borderTopStyle . setWidth ( width , Unit . PX ) ; m_borderBottomStyle . setWidth ( w...
public class VelocityEngineFactory { /** * Initialize a SpringResourceLoader for the given VelocityEngine . * < p > Called by { @ code initVelocityResourceLoader } . * @ param velocityEngine the VelocityEngine to configure * @ param resourceLoaderPath the path to load Velocity resources from * @ see SpringResou...
velocityEngine . setProperty ( RuntimeConstants . RESOURCE_LOADER , SpringResourceLoader . NAME ) ; velocityEngine . setProperty ( SpringResourceLoader . SPRING_RESOURCE_LOADER_CLASS , SpringResourceLoader . class . getName ( ) ) ; velocityEngine . setProperty ( SpringResourceLoader . SPRING_RESOURCE_LOADER_CACHE , "tr...
public class ClientAuthenticationService { /** * Create the basic auth subject using the given authentication data * @ param authenticationData the user , password and realm to create the subject * @ param subject the partial subject , can be null * @ return a basic auth subject that has not been authenticated ye...
Subject basicAuthSubject = subject != null ? subject : new Subject ( ) ; String loginRealm = ( String ) authenticationData . get ( AuthenticationData . REALM ) ; String username = ( String ) authenticationData . get ( AuthenticationData . USERNAME ) ; String password = getPassword ( ( char [ ] ) authenticationData . ge...
public class LTieByteConsumerBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static < T > LTieByteConsumer < T > tieByteConsumerFrom ( Consumer < LTieByteConsumerBuilder < T > > buildingFunction ...
LTieByteConsumerBuilder builder = new LTieByteConsumerBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class ReloadableType { /** * Groovy types need some extra fixup : * < ul > * < li > they contain a callsite array that caches destinations for calls . It needs clearing ( it will be reinitialized * when required ) * < li > not quite sure about the two : $ staticClassInfo and GroovySystem removeMetaClass ...
StringBuilder s = new StringBuilder ( ) ; if ( reflectiveTargets == null ) { reflectiveTargets = new Object [ 5 ] ; try { reflectiveTargets [ INDEX_SWAPINIT_METHOD ] = clazz . getDeclaredMethod ( "__$swapInit" ) ; } catch ( Exception e ) { s . append ( "cannot discover __$swapInit " + e . toString ( ) + " -- " ) ; } ...
public class VersionUtil { /** * Get implementation version from manifest in jar * @ param clazz The class to be load from jar package * @ return The implementation version */ public static String getImplementationVersion ( Class < ? > clazz ) { } }
/* * We don ' t use Package . getImplementationVersion ( ) due to * a duplicate package would override the origin package info . * https : / / stackoverflow . com / questions / 1272648 / reading - my - own - jars - manifest */ String className = clazz . getSimpleName ( ) + ".class" ; String classPath = clazz . getR...
public class Drawable { /** * Load an animated sprite from a file , giving horizontal and vertical frames . * Once created , sprite must call { @ link SpriteAnimated # load ( ) } before any other operations . * @ param media The sprite media ( must not be < code > null < / code > ) . * @ param horizontalFrames Th...
return new SpriteAnimatedImpl ( getMediaDpi ( media ) , horizontalFrames , verticalFrames ) ;
public class DML { /** * Execution of a DML block consists simply of executing the block ' s * arguments in order . If no arguments are run , then the value of the block * is < code > Undef < / code > . */ @ Override public Element execute ( Context context ) { } }
Element result = Undef . VALUE ; for ( Operation op : ops ) { try { result = op . execute ( context ) ; } catch ( EvaluationException ee ) { throw ee . addExceptionInfo ( sourceRange , context ) ; } } return result ;
public class Iterators { /** * Note : copied from Google Guava under Apache license v2 * < br / > * Calls { @ code next ( ) } on { @ code iterator } , either { @ code numberToAdvance } times * or until { @ code hasNext ( ) } returns { @ code false } , whichever comes first . * @ return the number of elements th...
N . checkArgNotNegative ( numberToAdvance , "numberToAdvance" ) ; long i ; for ( i = 0 ; i < numberToAdvance && iterator . hasNext ( ) ; i ++ ) { iterator . next ( ) ; } return i ;
public class ResourceAdapterContainerBase { /** * ( non - Javadoc ) * @ see org . jboss . declarchive . api . container . RContainer # setApplicationXML ( java . lang . String ) */ @ Override public T setResourceAdapterXML ( String resourceName ) throws IllegalArgumentException { } }
Validate . notNull ( resourceName , "ResourceName must be specified" ) ; return setResourceAdapterXML ( new ClassLoaderAsset ( resourceName ) ) ;
public class KeyVaultClientBaseImpl { /** * Recovers the deleted SAS definition . * Recovers the deleted SAS definition for the specified storage account . This operation can only be performed on a soft - delete enabled vault . This operation requires the storage / recover permission . * @ param vaultBaseUrl The va...
if ( vaultBaseUrl == null ) { throw new IllegalArgumentException ( "Parameter vaultBaseUrl is required and cannot be null." ) ; } if ( storageAccountName == null ) { throw new IllegalArgumentException ( "Parameter storageAccountName is required and cannot be null." ) ; } if ( sasDefinitionName == null ) { throw new Ill...
public class BatchFlusher { /** * Schedule an asynchronous opportunistically batching flush . */ public void flush ( ) { } }
if ( eventLoop . inEventLoop ( ) ) { pending ++ ; if ( pending >= maxPending ) { pending = 0 ; channel . flush ( ) ; } } if ( woken == 0 && WOKEN . compareAndSet ( this , 0 , 1 ) ) { woken = 1 ; eventLoop . execute ( wakeup ) ; }
public class NorwegianDateUtil { /** * Calculates easter day ( sunday ) by using Spencer Jones formula found here : * < a href = " http : / / no . wikipedia . org / wiki / P % C3 % A5skeformelen " > Wikipedia - * Påskeformelen < / a > * @ param year * The year to calculate from . * @ return The Calendar obje...
int a = year % 19 ; int b = year / 100 ; int c = year % 100 ; int d = b / 4 ; int e = b % 4 ; int f = ( b + 8 ) / 25 ; int g = ( b - f + 1 ) / 3 ; int h = ( ( 19 * a ) + b - d - g + 15 ) % 30 ; int i = c / 4 ; int k = c % 4 ; int l = ( 32 + ( 2 * e ) + ( 2 * i ) - h - k ) % 7 ; int m = ( a + ( 11 * h ) + ( 22 * l ) ) /...
public class PtoPLocalMsgsItemStream { /** * Gets the current value of SendAllowed used by this localization . * @ return */ @ Override public boolean isSendAllowed ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isSendAllowed" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isSendAllowed" , new Boolean ( _isSendAllowed ) ) ; return _isSendAllowed ;
public class ServiceInstanceUtils { /** * Validate the url of the Instance . * @ param url * the URL String . * @ return false if brace is invalid or URL is empty . */ private static boolean isValidBrace ( String url ) { } }
if ( null == url || url . trim ( ) . length ( ) == 0 ) { return false ; } boolean isInsideVariable = false ; StringTokenizer tokenizer = new StringTokenizer ( url , "{}" , true ) ; while ( tokenizer . hasMoreTokens ( ) ) { String token = tokenizer . nextToken ( ) ; if ( token . equals ( "{" ) ) { // { is not allowed in...
public class AtomicLongMapSubject { /** * Fails if the { @ link AtomicLongMap } contains the given key . */ public void doesNotContainKey ( Object key ) { } }
checkNotNull ( key , "AtomicLongMap does not support null keys" ) ; check ( "asMap().keySet()" ) . that ( actual ( ) . asMap ( ) . keySet ( ) ) . doesNotContain ( key ) ;
public class Version { /** * Prints full version information to the standard output . */ public static void printFullVersionInformation ( ) { } }
System . out . println ( INSTANCE . brandname ) ; System . out . println ( ) ; System . out . printf ( "Version: \t%s%n" , INSTANCE . version ) ; System . out . printf ( "Codename: \t%s%n" , INSTANCE . codename ) ; System . out . println ( ) ;
public class CertUtil { /** * 获取敏感信息加密证书的certId * @ return */ public static String getEncryptCertId ( ) { } }
if ( null == encryptCert ) { String path = SDKConfig . getConfig ( ) . getEncryptCertPath ( ) ; if ( ! isEmpty ( path ) ) { encryptCert = initCert ( path ) ; return encryptCert . getSerialNumber ( ) . toString ( ) ; } else { LogUtil . writeErrorLog ( "acpsdk.encryptCert.path is empty" ) ; return null ; } } else { retur...
public class SubscribeRequest { /** * A map of attributes with their corresponding values . * The following lists the names , descriptions , and values of the special request parameters that the * < code > SetTopicAttributes < / code > action uses : * < ul > * < li > * < code > DeliveryPolicy < / code > – The...
setAttributes ( attributes ) ; return this ;
public class FineUploader5DeleteFile { /** * Any additional parameters to attach to delete file requests . * @ param aParams * New parameters to be set . * @ return this */ @ Nonnull public FineUploader5DeleteFile setParams ( @ Nullable final Map < String , String > aParams ) { } }
m_aDeleteFileParams . setAll ( aParams ) ; return this ;
public class Scope { /** * { @ inheritDoc } */ @ Deprecated public Collection < Set < IConnection > > getConnections ( ) { } }
Collection < Set < IConnection > > result = new ArrayList < Set < IConnection > > ( 3 ) ; result . add ( getClientConnections ( ) ) ; return result ;
public class NodeImpl { /** * make it iterable and set index . * @ param node node to build * @ param index index to set * @ return iterable node implementation */ public static NodeImpl makeIterableAndSetIndex ( final NodeImpl node , final Integer index ) { } }
return new NodeImpl ( node . name , node . parent , true , index , null , node . kind , node . parameterTypes , node . parameterIndex , node . value , node . containerClass , node . typeArgumentIndex ) ;
public class UnifiedInputStreamX { /** * It is unclear what the implication to the rest of the system to make it ' conform ' */ public final int read ( byte [ ] dst , int offset , int length ) throws IOException { } }
if ( ! is_byte_data ( ) ) { throw new IOException ( "byte read is not support over character sources" ) ; } int remaining = length ; while ( remaining > 0 && ! isEOF ( ) ) { int ready = _limit - _pos ; if ( ready > remaining ) { ready = remaining ; } System . arraycopy ( _bytes , _pos , dst , offset , ready ) ; _pos +=...
public class ProductDimensions { /** * Creates a new ProductOfferId . * @ param offerId may be null if creating an " other " dimension */ public static ProductOfferId createOfferId ( @ Nullable String offerId ) { } }
ProductOfferId productOfferId = new ProductOfferId ( ) ; productOfferId . setValue ( offerId ) ; return productOfferId ;
public class StreamingCell { /** * Get the value of the cell as a date . For strings we throw an exception . For * blank cells we return a null . * @ return the value of the cell as a date * @ throws IllegalStateException if the cell type returned by { @ link # getCellType ( ) } is CELL _ TYPE _ STRING * @ thro...
if ( getCellType ( ) == CellType . STRING ) { throw new IllegalStateException ( "Cell type cannot be CELL_TYPE_STRING" ) ; } return rawContents == null ? null : HSSFDateUtil . getJavaDate ( getNumericCellValue ( ) , use1904Dates ) ;
public class ValidationExecutorSetRegistry { /** * Final all validation executor sets that match the provided filter . * @ param aFilter * The filter to be used . May be < code > null < / code > in which case the * result is the same as { @ link # getAll ( ) } . * @ return Never < code > null < / code > but may...
return m_aRWLock . readLocked ( ( ) -> m_aMap . findFirstValue ( e -> aFilter . test ( e . getValue ( ) ) ) ) ;
public class ParameterResolverImpl { /** * Apply system - wide overrides for default values . * @ param parameterValues Parameter values */ private void applyOverrideSystemDefault ( Map < String , Object > parameterValues ) { } }
for ( Parameter < ? > parameter : allParameters ) { Object overrideValue = parameterOverride . getOverrideSystemDefault ( parameter ) ; if ( overrideValue != null ) { parameterValues . put ( parameter . getName ( ) , overrideValue ) ; } }
public class Logger { /** * Log a message at the INFO level . * @ param marker The marker specific to this log statement * @ param message the message string to be logged * @ since 1.0.0 */ public void info ( final Marker marker , final String message ) { } }
log . info ( marker , sanitize ( message ) ) ;
public class CertUtil { /** * 用配置文件acp _ sdk . properties配置路径 加载敏感信息加密证书 */ private static void initMiddleCert ( ) { } }
LogUtil . writeLog ( "加载中级证书==>" + SDKConfig . getConfig ( ) . getMiddleCertPath ( ) ) ; if ( ! isEmpty ( SDKConfig . getConfig ( ) . getMiddleCertPath ( ) ) ) { middleCert = initCert ( SDKConfig . getConfig ( ) . getMiddleCertPath ( ) ) ; LogUtil . writeLog ( "Load MiddleCert Successful" ) ; } else { LogUtil . writeLo...
public class MessageBundle { /** * Obtém uma string com um mapa em JSON de todas as mensagens . */ public String getJSONMessages ( ) { } }
StringBuilder builder = new StringBuilder ( ) ; builder . append ( "{" ) ; boolean first = true ; Enumeration < String > keys = this . bundle . getKeys ( ) ; while ( keys . hasMoreElements ( ) ) { if ( ! first ) builder . append ( "," ) ; else first = false ; String key = keys . nextElement ( ) ; String value = this . ...
public class ListCACertificatesResult { /** * The CA certificates registered in your AWS account . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setCertificates ( java . util . Collection ) } or { @ link # withCertificates ( java . util . Collection ) } if ...
if ( this . certificates == null ) { setCertificates ( new java . util . ArrayList < CACertificate > ( certificates . length ) ) ; } for ( CACertificate ele : certificates ) { this . certificates . add ( ele ) ; } return this ;
public class syslog_params { /** * < pre > * Use this operation to modify the syslog parameters . * < / pre > */ public static syslog_params modify ( nitro_service client , syslog_params resource ) throws Exception { } }
resource . validate ( "modify" ) ; return ( ( syslog_params [ ] ) resource . update_resource ( client ) ) [ 0 ] ;
public class TaxinvoiceServiceImp { /** * / * ( non - Javadoc ) * @ see com . popbill . api . TaxinvoiceService # issue ( java . lang . String , com . popbill . api . taxinvoice . MgtKeyType , java . lang . String , java . lang . String , java . lang . String , boolean , java . lang . String ) */ @ Override public Is...
if ( KeyType == null ) throw new PopbillException ( - 99999999 , "관리번호형태가 입력되지 않았습니다." ) ; if ( MgtKey == null || MgtKey . isEmpty ( ) ) throw new PopbillException ( - 99999999 , "관리번호가 입력되지 않았습니다." ) ; IssueRequest request = new IssueRequest ( ) ; request . memo = Memo ; request . emailSubject = EmailSubject ; request...
public class Claim { /** * syntactic sugar */ public Claim addOccurrenceCode ( Coding t ) { } }
if ( t == null ) return this ; if ( this . occurrenceCode == null ) this . occurrenceCode = new ArrayList < Coding > ( ) ; this . occurrenceCode . add ( t ) ; return this ;
public class ContainerTracker { /** * Lookup a container by name or alias from the tracked containers * @ param lookup name or alias of the container to lookup * @ return container id found or < code > null < / code > */ public synchronized String lookupContainer ( String lookup ) { } }
if ( aliasToContainerMap . containsKey ( lookup ) ) { return aliasToContainerMap . get ( lookup ) ; } return imageToContainerMap . get ( lookup ) ;
public class EscEvents { /** * Creates in instance from the given JSON array . * @ param jsonArray * Array to read values from . * @ return New instance . */ public static EscEvents create ( final JsonArray jsonArray ) { } }
final List < EscEvent > events = new ArrayList < > ( ) ; for ( final JsonValue jsonValue : jsonArray ) { if ( jsonValue . getValueType ( ) != JsonValue . ValueType . OBJECT ) { throw new IllegalArgumentException ( "All elements in the JSON array must be an JsonObject, but was: " + jsonValue . getValueType ( ) ) ; } eve...
public class ApiWrapper { /** * Sets schedulers for API calls observables . * @ param obs Observable to set schedulers for . * @ param < E > Class of the service call result . * @ return Observable for API call . */ < E > Observable < E > wrapObservable ( Observable < E > obs ) { } }
return obs . subscribeOn ( Schedulers . io ( ) ) . observeOn ( Schedulers . io ( ) ) ;
public class AvailabilityForecast { /** * Sets the contendingLineItems value for this AvailabilityForecast . * @ param contendingLineItems * List of { @ link ContendingLineItem contending line items } for * this forecast . */ public void setContendingLineItems ( com . google . api . ads . admanager . axis . v201902...
this . contendingLineItems = contendingLineItems ;
public class B2buaHelperImpl { /** * { @ inheritDoc } */ public SipServletRequest createCancel ( SipSession session ) { } }
if ( session == null ) { throw new NullPointerException ( "The session for createCancel cannot be null" ) ; } for ( SipServletRequestImpl linkedRequest : linkedRequestMap . keySet ( ) ) { if ( linkedRequest . getSipSessionKey ( ) . equals ( ( ( MobicentsSipSession ) session ) . getKey ( ) ) && linkedRequest . getMethod...
public class ClassDescriptor { /** * Returns the matching { @ link FieldDescriptor } - only fields * of the current class will be scanned , to include fields defined * the the super - classes too , use method { @ link # getFieldDescriptor ( boolean ) } . */ public FieldDescriptor getFieldDescriptorByName ( String n...
if ( name == null || m_FieldDescriptions == null ) { return null ; } if ( m_fieldDescriptorNameMap == null ) { HashMap nameMap = new HashMap ( ) ; FieldDescriptor [ ] descriptors = getFieldDescriptions ( ) ; for ( int i = descriptors . length - 1 ; i >= 0 ; i -- ) { FieldDescriptor fld = descriptors [ i ] ; nameMap . p...
public class ByteBuffer { /** * Removes a byte array of the first N bytes in the buffer . The parameter * count must be a value between 1 and the capacity of the buffer , otherwise * a runtime IllegalArgumentException will be thrown . If the N bytes * requested is larger than the buffer size , then a < code > Buf...
if ( ( count < 0 ) || ( count > capacity ( ) ) ) { throw new IllegalArgumentException ( "Tried to remove " + count + " bytes from buffer. The count must be a value between 0 and " + capacity ( ) ) ; } if ( count > size ( ) ) { throw new BufferSizeException ( "Buffer size (" + size ( ) + ") not large enough to remove ("...
public class CSSFX { /** * Directly start monitoring CSS for the given node . * < ul > * < li > standard source file detectors : Maven , Gradle , execution from built JAR ( details in { @ link URIToPathConverters # DEFAULT _ CONVERTERS } ) < / li > * < li > detection activated on the node only ( and its children ...
CSSFXConfig cfg = new CSSFXConfig ( ) ; cfg . setRestrictedToNode ( node ) ; return cfg . start ( ) ;
public class MathBindings { /** * Binding for { @ link java . lang . Math # floorDiv ( int , int ) } * @ param x the dividend * @ param y the divisor * @ return the largest ( closest to positive infinity ) * { @ code int } value that is less than or equal to the algebraic quotient . * @ throws ArithmeticExcep...
return createIntegerBinding ( ( ) -> Math . floorDiv ( x . get ( ) , y . get ( ) ) , x , y ) ;
public class CamelCase { /** * Return camel - case if delim = ' - ' * @ param text * @ param delim * @ return */ public static final String delimitedLower ( String text , String delim ) { } }
return stream ( text ) . map ( ( String s ) -> { return s . toLowerCase ( ) ; } ) . collect ( Collectors . joining ( delim ) ) ;
public class StructUtil { /** * remove every entry hat has this value * @ param map * @ param obj */ public static void removeValue ( Map map , Object value ) { } }
Iterator it = map . entrySet ( ) . iterator ( ) ; Map . Entry entry ; while ( it . hasNext ( ) ) { entry = ( Entry ) it . next ( ) ; if ( entry . getValue ( ) == value ) it . remove ( ) ; }
public class BitshiftExpression { /** * Evaluate the expression . */ public Object evaluate ( ) { } }
if ( ! isCompileTimeConstant ( ) ) { return super . evaluate ( ) ; } Object lhsValue = getLHS ( ) . evaluate ( ) ; if ( lhsValue == null ) { return null ; } Object rhsValue = getRHS ( ) . evaluate ( ) ; if ( rhsValue == null ) { return null ; } IType type = getType ( ) ; if ( getOperator ( ) . equals ( "<<" ) ) { if ( ...
public class Pitch { /** * pitch _ fr3 - find the pitch period with 1/3 subsample resolution */ public static int pitch_fr3 ( /* output : integer part of pitch period */ float exc [ ] , int excs , /* input : excitation buffer */ float xn [ ] , int xns , /* input : target vector */ float h [ ] , int hs , /* input : impu...
int i , frac ; int lag , t_min , t_max ; float max ; float corr_int ; float corr_v [ ] = new float [ 10 + 2 * LD8KConstants . L_INTER4 ] ; /* size : 2 * L _ INTER4 + t0 _ max - t0 _ min + 1 */ int corr ; /* Find interval to compute normalized correlation */ t_min = t0_min - LD8KConstants . L_INTER4 ; t_max = t0_max + L...
public class CreateReplicationTaskRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateReplicationTaskRequest createReplicationTaskRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createReplicationTaskRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createReplicationTaskRequest . getReplicationTaskIdentifier ( ) , REPLICATIONTASKIDENTIFIER_BINDING ) ; protocolMarshaller . marshall ( createReplicationTas...
public class WebAppDispatcherContext { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . webcontainer . webapp . IWebAppDispatcherContext # dumpDispatchContextHierarchy ( ) */ public void dumpDispatchContextHierarchy ( ) { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "dumpDispatchContextHierarchy" , "current context -->" + this ) ; WebAppDispatcherContext tmpParentContext = parentContext ; while ( tmpParentContext != null ) { ...
public class aaapreauthenticationparameter { /** * Use this API to unset the properties of aaapreauthenticationparameter resource . * Properties that need to be unset are specified in args array . */ public static base_response unset ( nitro_service client , aaapreauthenticationparameter resource , String [ ] args ) ...
aaapreauthenticationparameter unsetresource = new aaapreauthenticationparameter ( ) ; return unsetresource . unset_resource ( client , args ) ;
public class SyslogMessage { /** * Generates a Syslog message complying to the < a href = " http : / / tools . ietf . org / html / rfc5424 " > RFC - 5424 < / a > format * or to the < a href = " http : / / tools . ietf . org / html / rfc3164 " > RFC - 3164 < / a > format . * @ param messageFormat message format * ...
switch ( messageFormat ) { case RFC_3164 : toRfc3164SyslogMessage ( out ) ; break ; case RFC_5424 : toRfc5424SyslogMessage ( out ) ; break ; case RFC_5425 : toRfc5425SyslogMessage ( out ) ; break ; default : throw new IllegalStateException ( "Unsupported message format '" + messageFormat + "'" ) ; }
public class Math { /** * Returns the column maximum for a matrix . */ public static double [ ] colMax ( double [ ] [ ] data ) { } }
double [ ] x = new double [ data [ 0 ] . length ] ; for ( int i = 0 ; i < x . length ; i ++ ) { x [ i ] = Double . NEGATIVE_INFINITY ; } for ( int i = 0 ; i < data . length ; i ++ ) { for ( int j = 0 ; j < x . length ; j ++ ) { if ( x [ j ] < data [ i ] [ j ] ) { x [ j ] = data [ i ] [ j ] ; } } } return x ;
public class BaseMenuScreen { /** * Is this the user ' s main menu ? * @ return true if this is the main menu . */ public boolean isMainMenu ( ) { } }
boolean bIsMainMenu = false ; if ( m_strMenu != null ) { if ( this . getTask ( ) != null ) if ( HtmlConstants . MAIN_MENU_KEY . equalsIgnoreCase ( this . getTask ( ) . getProperty ( DBParams . MENU ) ) ) bIsMainMenu = true ; if ( m_strMenu . equalsIgnoreCase ( HtmlConstants . MAIN_MENU_KEY ) ) bIsMainMenu = true ; else...
public class ConverterManager { /** * Gets a copy of the list of converters . * @ return the converters , a copy of the real data , never null */ public PeriodConverter [ ] getPeriodConverters ( ) { } }
ConverterSet set = iPeriodConverters ; PeriodConverter [ ] converters = new PeriodConverter [ set . size ( ) ] ; set . copyInto ( converters ) ; return converters ;
public class GetComplianceDetailsByResourceResult { /** * Indicates whether the specified AWS resource complies each AWS Config rule . * @ return Indicates whether the specified AWS resource complies each AWS Config rule . */ public java . util . List < EvaluationResult > getEvaluationResults ( ) { } }
if ( evaluationResults == null ) { evaluationResults = new com . amazonaws . internal . SdkInternalList < EvaluationResult > ( ) ; } return evaluationResults ;
public class LongArrayList { /** * Searches for the first occurrence of the given argument , testing * for equality using the < tt > equals < / tt > method . * @ param elem an object . * @ return the index of the first occurrence of the argument in this * list ; returns < tt > - 1 < / tt > if the object is not ...
if ( elem == null ) return - 1 ; if ( elem instanceof Number ) return indexOf ( ( ( Number ) elem ) . longValue ( ) ) ; return - 1 ;
public class DocumentTreeUrl { /** * Get Resource Url for GetTreeDocument * @ param documentListName Name of content documentListName to delete * @ param documentName The name of the document in the site . * @ param includeInactive Include inactive content . * @ param responseFields Filtering syntax appended to...
UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/documentTree/{documentName}?includeInactive={includeInactive}&responseFields={responseFields}" ) ; formatter . formatUrl ( "documentListName" , documentListName ) ; formatter . formatUrl ( "documentName" , documentName ) ; format...
public class RPCBatchRequestSender { /** * prepare a multipart form http request */ private RequestBuilder buildMultipart ( String name , String value ) { } }
String boundary = "AJAX------" + Math . random ( ) + "" + new Date ( ) . getTime ( ) ; RequestBuilder builderPost = new RequestBuilder ( RequestBuilder . POST , url ) ; builderPost . setHeader ( "Content-Type" , "multipart/form-data; charset=utf-8; boundary=" + boundary ) ; builderPost . setCallback ( requestCallback )...
public class RawMessageMarshaller { /** * Marshall the given parameter object . */ public void marshall ( RawMessage rawMessage , ProtocolMarshaller protocolMarshaller ) { } }
if ( rawMessage == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( rawMessage . getData ( ) , DATA_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class AdminCrawlinginfoAction { @ Execute public HtmlResponse details ( final int crudMode , final String id ) { } }
verifyCrudMode ( crudMode , CrudMode . DETAILS ) ; saveToken ( ) ; return crawlingInfoService . getCrawlingInfo ( id ) . map ( entity -> { return asHtml ( path_AdminCrawlinginfo_AdminCrawlinginfoDetailsJsp ) . useForm ( EditForm . class , op -> { op . setup ( form -> { copyBeanToBean ( entity , form , copyOp -> { copyO...
public class CmsResourceWrapperUtils { /** * Creates a virtual CmsFile with the individual and shared properties as content . < p > * For example looks like this : < br / > * Title . i = The title of the resource set as individual property < br / > * Title . s = The title of the resource set as shared property < ...
StringBuffer content = new StringBuffer ( ) ; // header content . append ( "# Properties for resource " ) ; content . append ( res . getRootPath ( ) ) ; content . append ( "\n" ) ; content . append ( "#\n" ) ; content . append ( "# ${property_name}.i : individual property\n" ) ; content . append ( "# ${property_name}.s...
public class TypeUtility { /** * Generate class typeName . * @ param className * the class name * @ return class typeName generated */ public static ClassName className ( String className ) { } }
int index = className . lastIndexOf ( "." ) ; if ( index > 0 ) { return classNameWithSuffix ( className . substring ( 0 , index ) , className . substring ( index + 1 ) , "" ) ; } return ClassName . get ( "" , className ) ;
public class Scanner { /** * Returns true if the next token in this scanner ' s input can be * interpreted as a byte value in the specified radix using the * { @ link # nextByte } method . The scanner does not advance past any input . * @ param radix the radix used to interpret the token as a byte value * @ ret...
setRadix ( radix ) ; boolean result = hasNext ( integerPattern ( ) ) ; if ( result ) { // Cache it try { String s = ( matcher . group ( SIMPLE_GROUP_INDEX ) == null ) ? processIntegerToken ( hasNextResult ) : hasNextResult ; typeCache = Byte . parseByte ( s , radix ) ; } catch ( NumberFormatException nfe ) { result = f...
public class ConfigurationPasswordChecker { /** * Validates a password . If not valid , throws a { @ link IllegalStateException } . * @ param password the provided password to validate * @ throws IllegalStateException if the password did not match */ public void assertPasswordCorrect ( String password ) { } }
if ( ! isPasswordSet ( ) ) { throw new IllegalStateException ( "'" + updateConfigPasswordKey + "' is not set." ) ; } if ( ! isPasswordCorrect ( password ) ) { throw new IllegalStateException ( "Wrong password for '" + updateConfigPasswordKey + "'." ) ; }
public class AppServiceEnvironmentsInner { /** * List all currently running operations on the App Service Environment . * List all currently running operations on the App Service Environment . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the App Ser...
return listOperationsWithServiceResponseAsync ( resourceGroupName , name ) . toBlocking ( ) . single ( ) . body ( ) ;
public class MaybeT { /** * { @ inheritDoc } */ @ Override public < B > MaybeT < M , B > pure ( B b ) { } }
return maybeT ( mma . pure ( just ( b ) ) ) ;
public class WorkClassLoader { /** * { @ inheritDoc } */ @ Override public void setDefaultAssertionStatus ( boolean enabled ) { } }
if ( resourceAdapterClassLoader != null ) resourceAdapterClassLoader . setDefaultAssertionStatus ( enabled ) ; super . setDefaultAssertionStatus ( enabled ) ;
public class EvernoteSession { /** * Returns a factory to create various clients and helper objects to get access to the Evernote API . * < br > * < br > * The returned factory is < b > not thread safe < / b > itself , however , the cached factory is a thread local * object . That means a new factory is created...
if ( mFactoryThreadLocal == null ) { mFactoryThreadLocal = new ThreadLocal < > ( ) ; } if ( mEvernoteClientFactoryBuilder == null ) { mEvernoteClientFactoryBuilder = new EvernoteClientFactory . Builder ( this ) ; } EvernoteClientFactory factory = mFactoryThreadLocal . get ( ) ; if ( factory == null ) { factory = mEvern...
public class Scheduler { /** * Wait until the current running jobs are executed * and cancel jobs that are planned to be executed . * @ param timeout The maximum time to wait * @ throws InterruptedException if the shutdown lasts more than 10 seconds */ @ SneakyThrows public void gracefullyShutdown ( Duration time...
logger . info ( "Shutting down..." ) ; if ( ! shuttingDown ) { synchronized ( this ) { shuttingDown = true ; threadPoolExecutor . shutdown ( ) ; } // stops jobs that have not yet started to be executed for ( Job job : jobStatus ( ) ) { Runnable runningJob = job . runningJob ( ) ; if ( runningJob != null ) { threadPoolE...
public class JDayChooser { /** * Enable or disable the JDayChooser . * @ param enabled * The new enabled value */ public void setEnabled ( boolean enabled ) { } }
super . setEnabled ( enabled ) ; for ( short i = 0 ; i < days . length ; i ++ ) { if ( days [ i ] != null ) { days [ i ] . setEnabled ( enabled ) ; } } for ( short i = 0 ; i < weeks . length ; i ++ ) { if ( weeks [ i ] != null ) { weeks [ i ] . setEnabled ( enabled ) ; } }
public class CareWebShellEx { /** * Register a menu . * @ param path Path for the menu . * @ param action Associated action for the menu . * @ return Created menu . */ public ElementMenuItem registerMenu ( String path , String action ) { } }
ElementMenuItem menu = getElement ( path , getDesktop ( ) . getMenubar ( ) , ElementMenuItem . class ) ; menu . setAction ( action ) ; return menu ;
public class BaseStrategy { /** * sqlgStep is either a { @ link SqlgGraphStep } or { @ link SqlgVertexStep } . * @ return false if optimization must be terminated . */ boolean handleStep ( ListIterator < Step < ? , ? > > stepIterator , MutableInt pathCount ) { } }
Step < ? , ? > step = stepIterator . next ( ) ; removeTinkerPopLabels ( step ) ; if ( step instanceof GraphStep ) { doFirst ( stepIterator , step , pathCount ) ; } else if ( this . sqlgStep == null ) { boolean keepGoing = doFirst ( stepIterator , step , pathCount ) ; stepIterator . previous ( ) ; return keepGoing ; } e...
public class TSUIDQuery { /** * Sets the query to perform * @ param metric Name of the metric to search for * @ param tags A map of tag value pairs or simply an empty map * @ throws NoSuchUniqueName if the metric or any of the tag names / values did * not exist * @ deprecated Please use one of the constructor...
this . metric = metric ; this . tags = tags ; metric_uid = tsdb . getUID ( UniqueIdType . METRIC , metric ) ; tag_uids = Tags . resolveAll ( tsdb , tags ) ;
public class LObjBoolPredicateBuilder { /** * Adds full new case for the argument that are of specific classes ( matched by instanceOf , null is a wildcard ) . */ @ Nonnull public < V extends T > LObjBoolPredicateBuilder < T > aCase ( Class < V > argC1 , LObjBoolPredicate < V > function ) { } }
PartialCaseWithBoolProduct . The pc = partialCaseFactoryMethod ( ( a1 , a2 ) -> ( argC1 == null || argC1 . isInstance ( a1 ) ) ) ; pc . evaluate ( function ) ; return self ( ) ;
public class FreemarkerLimit { /** * Inserts the appropriate LIMIT . . OFFSET . . statement into the query . * { @ inheritDoc } */ @ Override public void execute ( Environment env , Map params , TemplateModel [ ] loopVars , TemplateDirectiveBody body ) throws TemplateException , IOException { } }
if ( params . size ( ) > 1 ) { String message = "This directive doesn't allow multiple parameters." ; errors . add ( message ) ; throw new TemplateModelException ( message ) ; } if ( params . size ( ) == 1 && ! ( ( Map . Entry ) params . entrySet ( ) . toArray ( ) [ 0 ] ) . getKey ( ) . equals ( "sql" ) ) { String mess...
public class CNFactory { /** * 读入实体名识别模型 * @ param path 模型所在目录 , 结尾不带 " / " 。 * @ throws LoadModelException */ public static void loadNER ( String path ) throws LoadModelException { } }
if ( ner == null && pos != null ) { ner = new NERTagger ( pos ) ; }
public class ConversionAnalyzer { /** * This method finds the conversion method between those loaded . * @ param conversions conversion methods list * @ return the conversion method if found , null otherwise */ private ConversionMethod verifyConversionExistence ( List < ConversionMethod > conversions ) { } }
for ( ConversionMethod method : conversions ) if ( isPresentIn ( method . getFrom ( ) , sourceName ) && isPresentIn ( method . getTo ( ) , destinationName ) ) return method ; return null ;
public class LevelEqualsRule { /** * Populate list of levels . */ private static void populateLevels ( ) { } }
levelList = new LinkedList ( ) ; levelList . add ( Level . FATAL . toString ( ) ) ; levelList . add ( Level . ERROR . toString ( ) ) ; levelList . add ( Level . WARN . toString ( ) ) ; levelList . add ( Level . INFO . toString ( ) ) ; levelList . add ( Level . DEBUG . toString ( ) ) ; Level trace = Level . toLevel ( 50...
public class SocketUtility { /** * Check whether the specified server socket port is free or not . * Be aware that this method is not safe if there are so many programs trying to open server sockets . * @ param port the port number to be checked * @ return true if the port is free , or false if it is being used b...
ServerSocket s ; try { s = new ServerSocket ( port ) ; s . close ( ) ; } catch ( IOException e ) { return false ; } return true ;
public class NioUtils { /** * 读取文件到数组 */ public static byte [ ] read ( File sourceFile ) throws IOException { } }
if ( sourceFile == null ) { throw new IOException ( "Source must not be null" ) ; } if ( false == sourceFile . exists ( ) ) { throw new IOException ( "Source '" + sourceFile + "' does not exist" ) ; } if ( true == sourceFile . isDirectory ( ) ) { throw new IOException ( "Source '" + sourceFile + "' exists but is a dire...
public class RequestResponseChannel { /** * open should be called only once - we use FaultTolerantObject for that */ public void open ( final OperationResult < Void , Exception > onOpen , final OperationResult < Void , Exception > onClose ) { } }
this . onOpen = onOpen ; this . onClose = onClose ; this . sendLink . open ( ) ; this . receiveLink . open ( ) ;
public class ListPreference { /** * Sets the current value of the preference . By setting a value , it will be persisted . * @ param value * The value , which should be set , as a { @ link String } */ public final void setValue ( @ Nullable final String value ) { } }
if ( ! TextUtils . equals ( this . value , value ) ) { this . value = value ; persistString ( value ) ; notifyChanged ( ) ; }