signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ConcurrentReloadableManaged { /** * Construct a new managed reference . * @ return a new concurrent managed */ private ConcurrentManaged < T > newManaged ( ) { } }
return ConcurrentManaged . newManaged ( async , caller , managedOptions , setup , teardown ) ;
public class VJournal { /** * Sets either ( a ) the creation date of the iCalendar object ( if the * { @ link Method } property is defined ) or ( b ) the date that the journal * entry was last modified ( the { @ link LastModified } property also holds * this information ) . This journal entry object comes populat...
DateTimeStamp prop = ( dateTimeStamp == null ) ? null : new DateTimeStamp ( dateTimeStamp ) ; setDateTimeStamp ( prop ) ; return prop ;
public class RandomVariableAAD { /** * / * ( non - Javadoc ) * @ see net . finmath . stochastic . RandomVariable # accrue ( net . finmath . stochastic . RandomVariable , double ) */ @ Override public RandomVariable accrue ( RandomVariable rate , double periodLength ) { } }
return apply ( OperatorType . ACCRUE , new RandomVariable [ ] { this , rate , constructNewAADRandomVariable ( periodLength ) } ) ;
public class HlsManifestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( HlsManifest hlsManifest , ProtocolMarshaller protocolMarshaller ) { } }
if ( hlsManifest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( hlsManifest . getAdMarkers ( ) , ADMARKERS_BINDING ) ; protocolMarshaller . marshall ( hlsManifest . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( hlsManifest ....
public class AbstrCFMLScriptTransformer { /** * Liest ein for Statement ein . < br / > * EBNF : < br / > * < code > expression spaces " ; " spaces condition spaces " ; " spaces expression spaces " ) " spaces block ; < / code > * @ return for Statement * @ throws TemplateException */ private final Statement forS...
int pos = data . srcCode . getPos ( ) ; // id String id = variableDec ( data , false ) ; if ( id == null ) { data . srcCode . setPos ( pos ) ; return null ; } if ( id . equalsIgnoreCase ( "for" ) ) { id = null ; data . srcCode . removeSpace ( ) ; if ( ! data . srcCode . forwardIfCurrent ( '(' ) ) { data . srcCode . set...
public class ServletRequestWrapper { /** * The default behavior of this method is to invoke * { @ link ServletRequest # startAsync ( ServletRequest , ServletResponse ) } * on the wrapped request object . * @ param servletRequest the ServletRequest used to initialize the * AsyncContext * @ param servletRespons...
return request . startAsync ( servletRequest , servletResponse ) ;
public class JobInProgress { /** * Adds the failed TIP in the front of the list for non - running maps * @ param tip the tip that needs to be failed */ private synchronized void failMap ( TaskInProgress tip ) { } }
if ( nonRunningMapCache == null ) { LOG . warn ( "Non-running cache for maps missing!! " + "Job details are missing." ) ; return ; } // 1 . Its added everywhere since other nodes ( having this split local ) // might have removed this tip from their local cache // 2 . Give high priority to failed tip - fail early String...
public class AutomationAccountsInner { /** * Lists the Automation Accounts within an Azure subscription . * Retrieve a list of accounts within a given subscription . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; AutomationAccountInne...
return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < AutomationAccountInner > > , Page < AutomationAccountInner > > ( ) { @ Override public Page < AutomationAccountInner > call ( ServiceResponse < Page < AutomationAccountInner > > response ) { return response . body ( ) ; } } ) ;
public class ResourceLookup { /** * Returns the stream of a resource at a given path , using the CL of a class . * @ param path the path to search * @ param clazz a { @ link java . lang . Class } instance which class loader should be used when doing the lookup . * @ param useTLCL { @ code true } if the thread loc...
return read ( path , clazz . getClassLoader ( ) , useTLCL ) ;
public class LoadPermissionModifications { /** * The load permissions to remove . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRemove ( java . util . Collection ) } or { @ link # withRemove ( java . util . Collection ) } if you want to override the * ...
if ( this . remove == null ) { setRemove ( new com . amazonaws . internal . SdkInternalList < LoadPermissionRequest > ( remove . length ) ) ; } for ( LoadPermissionRequest ele : remove ) { this . remove . add ( ele ) ; } return this ;
public class SymbolOptions { /** * Creates SymbolOptions out of a Feature . * @ param feature feature to be converted */ @ Nullable static SymbolOptions fromFeature ( @ NonNull Feature feature ) { } }
if ( feature . geometry ( ) == null ) { throw new RuntimeException ( "geometry field is required" ) ; } if ( ! ( feature . geometry ( ) instanceof Point ) ) { return null ; } SymbolOptions options = new SymbolOptions ( ) ; options . geometry = ( Point ) feature . geometry ( ) ; if ( feature . hasProperty ( PROPERTY_ICO...
public class AuthUtils { /** * Returns OAuth previously stored access token from HTTP session * Null is returned if token is present but does not have requested scopes or * the token has been expired * @ param requestContext request context * @ param provider token provider * @ param scopes required scopes ...
HttpSession session = requestContext . getRequest ( ) . getSession ( ) ; OAuthAccessToken [ ] accessTokens = ( OAuthAccessToken [ ] ) session . getAttribute ( String . format ( PROVIDER_ACCESS_TOKENS , provider ) ) ; if ( accessTokens != null ) { for ( OAuthAccessToken accessToken : accessTokens ) { List < String > acc...
public class HCHelper { /** * Find the first HTML child element within a start element . This check * considers both lower - and upper - case element names . Mixed case is not * supported ! * @ param aElement * The element to search in * @ param eHTMLElement * The HTML element to search . * @ return < cod...
ValueEnforcer . notNull ( aElement , "element" ) ; ValueEnforcer . notNull ( eHTMLElement , "HTMLElement" ) ; // First try with lower case name IMicroElement aChild = aElement . getFirstChildElement ( eHTMLElement . getElementName ( ) ) ; if ( aChild == null ) { // Fallback : try with upper case name aChild = aElement ...
public class FixedWidthTextSequencer { /** * Set the column start positions . The column start positions are 0 - based . Everything before the first start position is * treated as the first column . * As an example , if the column start positions were { 3 , 6 , 15 } and the incoming stream was : * < pre > * 1 2...
CheckArg . isNotNull ( columnStartPositions , "columnStartPositions" ) ; this . columnStartPositions = columnStartPositions ; Arrays . sort ( columnStartPositions ) ;
public class ValueFilterAdapter { /** * { @ inheritDoc } */ @ Override public Filter adapt ( FilterAdapterContext context , ValueFilter filter ) throws IOException { } }
return toFilter ( context , filter ) ;
public class Service { /** * < pre > * Experimental configuration . * < / pre > * < code > . google . api . Experimental experimental = 101 ; < / code > */ public com . google . api . Experimental getExperimental ( ) { } }
return experimental_ == null ? com . google . api . Experimental . getDefaultInstance ( ) : experimental_ ;
public class MathUtils { /** * This returns the sum of products for the given * numbers . * @ param nums the sum of products for the give numbers * @ return the sum of products for the given numbers */ public static double sumOfProducts ( double [ ] ... nums ) { } }
if ( nums == null || nums . length < 1 ) return 0 ; double sum = 0 ; for ( int i = 0 ; i < nums . length ; i ++ ) { /* The ith column for all of the rows */ double [ ] column = column ( i , nums ) ; sum += times ( column ) ; } return sum ;
public class Jsr353JsonFunction { /** * using fromJson ( ) function */ private static void insertFromJson ( CqlSession session ) { } }
JsonObject alice = Json . createObjectBuilder ( ) . add ( "name" , "alice" ) . add ( "age" , 30 ) . build ( ) ; JsonObject bob = Json . createObjectBuilder ( ) . add ( "name" , "bob" ) . add ( "age" , 35 ) . build ( ) ; JsonObject aliceScores = Json . createObjectBuilder ( ) . add ( "call_of_duty" , 4.8 ) . add ( "poke...
public class CalendarFormatterBase { /** * Format the seconds , optionally zero - padded . */ void formatSeconds ( StringBuilder b , ZonedDateTime d , int width ) { } }
zeroPad2 ( b , d . getSecond ( ) , width ) ;
public class ElementAttributesFactory { /** * Parse the tag and return the ElementAttributes * @ param tag * the tag to parse * @ return ElementAttributes */ static ElementAttributes createElementAttributes ( String tag ) { } }
// Parsing strings // < ! - - $ includetemplate $ aggregated2 $ templatewithparams . jsp $ - - > // or // < ! - - $ includeblock $ aggregated2 $ $ ( block ) $ myblock $ - - > // in order to retrieve driver , page and name attributes Pattern pattern = Pattern . compile ( "(?<=\\$)(?:[^\\$]|\\$\\()*(?=\\$)" ) ; Matcher m...
public class InodeTree { /** * Marks an inode directory as having its direct children loaded . * @ param context journal context supplier * @ param dir the inode directory */ public void setDirectChildrenLoaded ( Supplier < JournalContext > context , InodeDirectory dir ) { } }
mState . applyAndJournal ( context , UpdateInodeDirectoryEntry . newBuilder ( ) . setId ( dir . getId ( ) ) . setDirectChildrenLoaded ( true ) . build ( ) ) ;
public class ConfigOption { /** * Gets the fallback keys , in the order to be checked . * @ return The option ' s fallback keys . */ public Iterable < FallbackKey > fallbackKeys ( ) { } }
return ( fallbackKeys == EMPTY ) ? Collections . emptyList ( ) : Arrays . asList ( fallbackKeys ) ;
public class NonBlockingCharArrayWriter { /** * Returns a copy of the input data as bytes in the correct charset . * @ param aCharset * The charset to be used . May not be < code > null < / code > . * @ return an array of bytes . Never < code > null < / code > . */ @ Nonnull @ ReturnsMutableCopy public byte [ ] t...
return StringHelper . encodeCharToBytes ( m_aBuf , 0 , m_nCount , aCharset ) ;
public class ResourcePool { /** * With . * @ param f the f * @ param filter */ public void with ( @ javax . annotation . Nonnull final java . util . function . Consumer < T > f , final Predicate < T > filter ) { } }
final T prior = currentValue . get ( ) ; if ( null != prior ) { f . accept ( prior ) ; } else { final T poll = get ( filter ) ; try { currentValue . set ( poll ) ; f . accept ( poll ) ; } finally { this . pool . add ( poll ) ; currentValue . remove ( ) ; } }
public class PaymentSettingsUrl { /** * Get Resource Url for GetThirdPartyPaymentWorkflowWithValues * @ param fullyQualifiedName Fully qualified name of the attribute for the third - party payment workflow . * @ param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data...
UrlFormatter formatter = new UrlFormatter ( "/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflow/{fullyQualifiedName}?responseFields={responseFields}" ) ; formatter . formatUrl ( "fullyQualifiedName" , fullyQualifiedName ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl...
public class AmazonDynamoDBAsyncClient { /** * Gets the values of one or more items and its attributes by primary key * ( composite primary key , only ) . * Narrow the scope of the query using comparison operators on the * < code > RangeKeyValue < / code > of the composite key . Use the * < code > ScanIndexForw...
return executorService . submit ( new Callable < QueryResult > ( ) { public QueryResult call ( ) throws Exception { QueryResult result ; try { result = query ( queryRequest ) ; } catch ( Exception ex ) { asyncHandler . onError ( ex ) ; throw ex ; } asyncHandler . onSuccess ( queryRequest , result ) ; return result ; } ...
public class BufferedWriter { /** * Closes the servlet output stream . */ public void close ( ) throws IOException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { // 306998.15 Tr . debug ( tc , "close" ) ; } // Were we requested to close the underlying stream ? finish ( ) ; try { // 104771 - alert the observer that the underlying stream is being closed obs . alertClose ( ) ; // don ' t close the underly...
public class NativeArray { /** * Implements the methods " reduce " and " reduceRight " . */ private static Object reduceMethod ( Context cx , int id , Scriptable scope , Scriptable thisObj , Object [ ] args ) { } }
Scriptable o = ScriptRuntime . toObject ( cx , scope , thisObj ) ; long length = getLengthProperty ( cx , o , false ) ; Object callbackArg = args . length > 0 ? args [ 0 ] : Undefined . instance ; if ( callbackArg == null || ! ( callbackArg instanceof Function ) ) { throw ScriptRuntime . notFunctionError ( callbackArg ...
public class AWSStepFunctionsClient { /** * Used by workers to retrieve a task ( with the specified activity ARN ) which has been scheduled for execution by a * running state machine . This initiates a long poll , where the service holds the HTTP connection open and responds * as soon as a task becomes available ( ...
request = beforeClientExecution ( request ) ; return executeGetActivityTask ( request ) ;
public class CollectionFactory { /** * Create the most approximate map for the given map . * < p > Creates a TreeMap or linked Map for a SortedMap or Map , respectively . * @ param map the original Map object * @ param initialCapacity the initial capacity * @ return the new Map instance * @ see java . util . ...
if ( map instanceof SortedMap ) { return new TreeMap ( ( ( SortedMap ) map ) . comparator ( ) ) ; } else { return new LinkedHashMap ( initialCapacity ) ; }
public class ImmutableConciseSet { /** * Based on the ConciseSet implementation by Alessandro Colantonio */ public IntSet . IntIterator iterator ( ) { } }
if ( isEmpty ( ) ) { return new IntSet . IntIterator ( ) { @ Override public void skipAllBefore ( int element ) { /* empty */ } @ Override public boolean hasNext ( ) { return false ; } @ Override public int next ( ) { throw new NoSuchElementException ( ) ; } @ Override public void remove ( ) { throw new UnsupportedOper...
public class RouteBuilder { /** * Extracts user segment name from route config . Returns null if no pattern match : { xxx } . * @ param segment user segment , such as " { user _ id } " , " { fav _ color } " , etc . * @ return the name inside the braces , " user _ id " , " fav _ color " , etc . * Returns null if n...
Matcher m = USER_SEGMENT_PATTERN . matcher ( segment ) ; if ( m . find ( ) ) { String value = m . group ( 0 ) ; return value . substring ( 1 , value . length ( ) - 1 ) ; // I wish I knew regexp better ! } return null ;
public class ListStacksRequest { /** * Stack status to use as a filter . Specify one or more stack status codes to list only stacks with the specified * status codes . For a complete list of stack status codes , see the < code > StackStatus < / code > parameter of the * < a > Stack < / a > data type . * @ return ...
if ( stackStatusFilters == null ) { stackStatusFilters = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return stackStatusFilters ;
public class ConjunctionContextGenerator { /** * / * ( non - Javadoc ) * @ see jvntextpro . data . ContextGenerator # getContext ( jvntextpro . data . Sentence , int ) */ @ Override public String [ ] getContext ( Sentence sent , int pos ) { } }
List < String > cps = new ArrayList < String > ( ) ; for ( int it = 0 ; it < cpnames . size ( ) ; ++ it ) { String cp = cpnames . get ( it ) ; Vector < Integer > paras = this . paras . get ( it ) ; String cpvalue = "" ; if ( cp . equals ( "syll_conj_gen" ) ) { String prefix = "s:" ; String suffix = "" ; for ( int i = 0...
public class IOUtils { /** * Reads len bytes in a loop using the channel of the stream */ public static int readFileChannelFully ( FileChannel fileChannel , byte buf [ ] , int off , int len , long offset , boolean throwOnEof ) throws IOException { } }
ByteBuffer byteBuffer = ByteBuffer . wrap ( buf , off , len ) ; int toRead = len ; int dataRead = 0 ; while ( toRead > 0 ) { int ret = fileChannel . read ( byteBuffer , offset ) ; if ( ret < 0 ) { if ( throwOnEof ) { throw new IOException ( "Premeture EOF from inputStream" ) ; } else { return dataRead ; } } toRead -= r...
public class Log { /** * Generates a string with { @ code length } spaces . * @ param length length of the string * @ return the string */ public static String getSpaces ( int length ) { } }
char [ ] charArray = new char [ length ] ; Arrays . fill ( charArray , ' ' ) ; String str = new String ( charArray ) ; return str ;
public class SubnetworkClient { /** * Creates a subnetwork in the specified project using the data included in the request . * < p > Sample code : * < pre > < code > * try ( SubnetworkClient subnetworkClient = SubnetworkClient . create ( ) ) { * ProjectRegionName region = ProjectRegionName . of ( " [ PROJECT ] ...
InsertSubnetworkHttpRequest request = InsertSubnetworkHttpRequest . newBuilder ( ) . setRegion ( region == null ? null : region . toString ( ) ) . setSubnetworkResource ( subnetworkResource ) . build ( ) ; return insertSubnetwork ( request ) ;
public class DefaultAndroidDeferredManager { /** * If a non - Android friendly promise is passed in , wrap it with { @ link AndroidDeferredObject } * so that callbacks can be executed in the corresponding execution scope . * @ param scope Whether to execute in UI thread or Background thread * @ param promise A pr...
if ( promise instanceof AndroidDeferredObject ) { return promise ; } return new AndroidDeferredObject < D , F , P > ( promise , scope ) . promise ( ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link String } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.ibm.com/websphere/wim" , name = "stateOrProvinceName" ) public JAXBElement < String > createStateOrProvinceName ( String value ) { } }
return new JAXBElement < String > ( _StateOrProvinceName_QNAME , String . class , null , value ) ;
public class UserPreferences { /** * Additional plugins which could be used by { @ link IFindBugsEngine } ( if * enabled ) , or which shouldn ' t be used ( if disabled ) . If a plugin is not * included in the set , it ' s enablement depends on it ' s default settings . * @ param customPlugins * map with additio...
if ( customPlugins == null ) { throw new IllegalArgumentException ( "customPlugins may not be null." ) ; } this . customPlugins = customPlugins ;
public class ModelRegistry { /** * Finds the most specific models for the given { @ link Resource } . The model ' s model * name must match the provided model name . * @ param resource must not be < code > null < / code > . * @ param modelName must not be < code > null < / code > . * @ return the resolved model...
if ( resource == null ) { throw new IllegalArgumentException ( "Method argument resource must not be null." ) ; } if ( modelName == null ) { throw new IllegalArgumentException ( "Method argument modelName must not be null." ) ; } Key key = key ( resource , modelName ) ; if ( isUnmapped ( key ) ) { return null ; } Colle...
public class AWSStorageGatewayClient { /** * Updates a Network File System ( NFS ) file share . This operation is only supported in the file gateway type . * < note > * To leave a file share field unchanged , set the corresponding input field to null . * < / note > * Updates the following file share setting : ...
request = beforeClientExecution ( request ) ; return executeUpdateNFSFileShare ( request ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcVibrationIsolatorType ( ) { } }
if ( ifcVibrationIsolatorTypeEClass == null ) { ifcVibrationIsolatorTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 637 ) ; } return ifcVibrationIsolatorTypeEClass ;
public class ExternalChildResourceImpl { /** * Add a dependency task item for this model . * @ param dependency the dependency task item . * @ return key to be used as parameter to taskResult ( string ) method to retrieve result the task item */ protected String addDependency ( FunctionalTaskItem dependency ) { } }
Objects . requireNonNull ( dependency ) ; return this . taskGroup ( ) . addDependency ( dependency ) ;
public class CFMLExpressionInterpreter { /** * Transfomiert einen lierale Zeichenkette . < br / > * EBNF : < br / > * < code > ( " ' " { " # # " | " ' ' " | " # " impOp " # " | ? - " # " - " ' " } " ' " ) | * ( " " " { " # # " | " " " " | " # " impOp " # " | ? - " # " - " " " } " " " ) ; < / code > * @ return C...
// Init Parameter char quoter = cfml . getCurrentLower ( ) ; LStringBuffer str = new LStringBuffer ( ) ; Ref value = null ; while ( cfml . hasNext ( ) ) { cfml . next ( ) ; // check sharp if ( ! limited && cfml . isCurrent ( '#' ) ) { if ( cfml . isNext ( '#' ) ) { cfml . next ( ) ; str . append ( '#' ) ; } else { cfml...
public class WdrVideoUrlParser { /** * Ermittelt die Video - URLs für einen WDR - Film * @ param jsUrl URL für Javascript - Dateien , die Video - URLs beinhaltet * @ return Map mit den verfügbaren Video - Qualitäten */ public WdrVideoDto parse ( String jsUrl ) { } }
WdrVideoDto dto = new WdrVideoDto ( ) ; String javascript = urlLoader . executeRequest ( jsUrl ) ; if ( javascript . isEmpty ( ) ) { return dto ; } // URL suchen String url = getSubstring ( javascript , JS_SEARCH_ALT , "\"" ) ; String f4m = getSubstring ( javascript , JS_SEARCH_DFLT , "\"" ) ; // Fehlendes Protokoll er...
public class NettyClient { /** * Avoid channel double close */ void closeChannel ( final Channel channel ) { } }
synchronized ( channelClosing ) { if ( closingChannel . contains ( channel ) ) { LOG . info ( channel . toString ( ) + " has already been closed" ) ; return ; } closingChannel . add ( channel ) ; } LOG . debug ( channel . toString ( ) + " begin to close" ) ; ChannelFuture closeFuture = channel . close ( ) ; closeFuture...
public class TextMateGenerator2 { /** * Generate the rules for the annotations . * @ return the rules . */ protected List < Map < String , ? > > generateAnnotations ( ) { } }
final List < Map < String , ? > > list = new ArrayList < > ( ) ; list . add ( pattern ( it -> { it . matches ( "\\@[_a-zA-Z$][_0-9a-zA-Z$]*" ) ; // $ NON - NLS - 1 $ it . style ( ANNOTATION_STYLE ) ; it . comment ( "Annotations" ) ; // $ NON - NLS - 1 $ } ) ) ; return list ;
public class LevenbergMarquardt { /** * Performs sanity checks on the input data and reshapes internal matrices . By reshaping * a matrix it will only declare new memory when needed . */ protected void configure ( ResidualFunction function , int numParam ) { } }
this . function = function ; int numFunctions = function . numFunctions ( ) ; // reshaping a matrix means that new memory is only declared when needed candidateParameters . reshape ( numParam , 1 ) ; g . reshape ( numParam , 1 ) ; H . reshape ( numParam , numParam ) ; negativeStep . reshape ( numParam , 1 ) ; // Normal...
public class CsvOpenCSV { /** * - - - OBJECT TO COLLECTION CONVERTER - - - */ protected static final Collection < ? > objectToCollection ( Object object ) { } }
Collection < ? > collection = null ; if ( object != null ) { if ( object instanceof Collection ) { collection = ( Collection < ? > ) object ; } else if ( object instanceof Map ) { collection = ( ( Map < ? , ? > ) object ) . values ( ) ; } else if ( object . getClass ( ) . isArray ( ) ) { LinkedList < Object > list = ne...
public class WFG { /** * Gets the x vector */ public float [ ] calculateX ( float [ ] t ) { } }
float [ ] x = new float [ m ] ; for ( int i = 0 ; i < m - 1 ; i ++ ) { x [ i ] = Math . max ( t [ m - 1 ] , a [ i ] ) * ( t [ i ] - ( float ) 0.5 ) + ( float ) 0.5 ; } x [ m - 1 ] = t [ m - 1 ] ; return x ;
public class KryoTranscoderFactory { /** * Gets / creates a single instance of { @ link KryoTranscoder } . * @ param classLoader the class loader of the web app container / context . * @ return for all invocations the same instance of { @ link KryoTranscoder } . */ private KryoTranscoder getTranscoder ( final Class...
if ( _transcoder == null ) { final int initialBufferSize = getSysPropValue ( PROP_INIT_BUFFER_SIZE , KryoTranscoder . DEFAULT_INITIAL_BUFFER_SIZE ) ; final int maxBufferSize = getSysPropValue ( PROP_ENV_MAX_BUFFER_SIZE , KryoTranscoder . DEFAULT_MAX_BUFFER_SIZE ) ; final String defaultSerializerFactory = getSysPropValu...
public class Proxy { /** * Specify which proxy to use for FTP connections . * @ param ftpProxy the proxy host , expected format is < code > hostname . com : 1234 < / code > * @ return reference to self */ public Proxy setFtpProxy ( String ftpProxy ) { } }
verifyProxyTypeCompatibility ( ProxyType . MANUAL ) ; this . proxyType = ProxyType . MANUAL ; this . ftpProxy = ftpProxy ; return this ;
public class PatternFileFilter { /** * Creates a new List containing an include - mode PatternFileFilter using the supplied patternStrings which * are interpreted as file suffixes . ( I . e . prepended with { @ code PATTERN _ LETTER _ DIGIT _ PUNCT } and compiled to * Patterns ) . The { @ code FILE _ PATH _ CONVERT...
return createFilterList ( log , true , patterns ) ;
public class CmsDetailOnlyContainerUtil { /** * Checks whether the given resource path is of a detail containers page . < p > * @ param cms the cms context * @ param detailContainersPage the resource site path * @ return < code > true < / code > if the given resource path is of a detail containers page */ public ...
boolean result = false ; try { String detailName = CmsResource . getName ( detailContainersPage ) ; String parentFolder = CmsResource . getParentFolder ( detailContainersPage ) ; if ( ! parentFolder . endsWith ( "/" + DETAIL_CONTAINERS_FOLDER_NAME + "/" ) ) { // this will be the case for locale dependent detail only pa...
public class TcpServerTransport { /** * Creates a new instance * @ param address the address to bind to * @ return a new instance * @ throws NullPointerException if { @ code address } is { @ code null } */ public static TcpServerTransport create ( InetSocketAddress address ) { } }
Objects . requireNonNull ( address , "address must not be null" ) ; return create ( address . getHostName ( ) , address . getPort ( ) ) ;
public class MouseHeadless { /** * Update coordinate from event . * @ param event event consumed . */ private void updateCoord ( MouseEvent event ) { } }
oldX = x ; oldY = y ; x = event . getX ( ) ; y = event . getY ( ) ; mx = x - oldX ; my = y - oldY ;
public class ApplicationLauncher { /** * Returns an { @ code ApplicationContext } , loaded from the bean definition * files at the classpath - relative locations specified by * { @ code configLocations } . * If a splash screen has been created , the application context will be * loaded with a bean post processo...
final ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext ( configLocations , false ) ; if ( splashScreen instanceof MonitoringSplashScreen ) { final ProgressMonitor tracker = ( ( MonitoringSplashScreen ) splashScreen ) . getProgressMonitor ( ) ; applicationContext . addBeanFactoryPos...
public class ListFunctionsResult { /** * A list of Lambda functions . * @ return A list of Lambda functions . */ public java . util . List < FunctionConfiguration > getFunctions ( ) { } }
if ( functions == null ) { functions = new com . amazonaws . internal . SdkInternalList < FunctionConfiguration > ( ) ; } return functions ;
public class AdminSchedulerAction { @ Execute public HtmlResponse createnewjob ( final String type , final String id , final String name ) { } }
saveToken ( ) ; return asHtml ( path_AdminScheduler_AdminSchedulerEditJsp ) . useForm ( CreateForm . class , op -> { op . setup ( scheduledJobForm -> { scheduledJobForm . initialize ( ) ; scheduledJobForm . crudMode = CrudMode . CREATE ; scheduledJobForm . jobLogging = Constants . ON ; scheduledJobForm . crawler = Cons...
public class Colors { /** * < p > toRGB . < / p > * @ param color a { @ link java . awt . Color } object . * @ return a { @ link java . lang . String } object . */ public static String toRGB ( Color color ) { } }
String rgb = "#" ; rgb += formatAsHex ( color . getRed ( ) ) ; rgb += formatAsHex ( color . getGreen ( ) ) ; rgb += formatAsHex ( color . getBlue ( ) ) ; return rgb ;
public class CollectionDiff { /** * Compare and find out the difference between two collections . * The comparison depends on hashCode ( . . . ) and equals ( . . . ) methods of the elements . * @ param lhsleft hand side * @ param rhsright hand side * @ returnthe result with information about elements only in lh...
Set < T > onlyInLhs = new HashSet < T > ( lhs ) ; onlyInLhs . removeAll ( rhs ) ; Set < T > inBoth = new HashSet < T > ( lhs ) ; inBoth . removeAll ( onlyInLhs ) ; Set < T > onlyInRhs = new HashSet < T > ( rhs ) ; onlyInRhs . removeAll ( inBoth ) ; return new Result < T > ( onlyInLhs , onlyInRhs , inBoth ) ;
public class FluxUtil { /** * Gets the content of the provided ByteBuf as a byte array . * This method will create a new byte array even if the ByteBuf can * have optionally backing array . * @ param byteBuf the byte buffer * @ return the byte array */ public static byte [ ] byteBufToArray ( ByteBuf byteBuf ) {...
int length = byteBuf . readableBytes ( ) ; byte [ ] byteArray = new byte [ length ] ; byteBuf . getBytes ( byteBuf . readerIndex ( ) , byteArray ) ; return byteArray ;
public class AdminCommand { /** * Parses command - line and directs to command groups or non - grouped * sub - commands . * @ param args Command - line input * @ throws Exception */ public static void executeCommand ( String [ ] args ) throws Exception { } }
String subCmd = ( args . length > 0 ) ? args [ 0 ] : "" ; args = AdminToolUtils . copyArrayCutFirst ( args ) ; if ( subCmd . equals ( "async-job" ) ) { AdminCommandAsyncJob . executeCommand ( args ) ; } else if ( subCmd . equals ( "scheduled" ) ) { AdminCommandScheduled . executeCommand ( args ) ; } else if ( subCmd . ...
public class AxisAngle4f { /** * Transform the given vector by the rotation transformation described by this { @ link AxisAngle4f } * and store the result in < code > dest < / code > . * @ param v * the vector to transform * @ param dest * will hold the result * @ return dest */ public Vector4f transform ( ...
double sin = Math . sin ( angle ) ; double cos = Math . cosFromSin ( sin , angle ) ; float dot = x * v . x ( ) + y * v . y ( ) + z * v . z ( ) ; dest . set ( ( float ) ( v . x ( ) * cos + sin * ( y * v . z ( ) - z * v . y ( ) ) + ( 1.0 - cos ) * dot * x ) , ( float ) ( v . y ( ) * cos + sin * ( z * v . x ( ) - x * v . ...
public class JvmTypesBuilder { /** * Adds or removes the annotation { @ link Extension @ Extension } from the given field . If the annotation is * already present , nothing is done if { @ code value } is { @ code true } . If it is not present and { @ code value } * is { @ code false } , this is a no - op , too . ...
if ( field == null ) return ; internalSetExtension ( field , sourceElement , value ) ;
public class PropertyLoader { /** * Get collection element type for given type . Given type type should * be assignable from { @ link Collection } . For collections without * generic returns { @ link String } . */ protected Class < ? > getCollectionElementType ( Type genericType ) throws ConversionException { } }
if ( genericType instanceof ParameterizedType ) { ParameterizedType parameterizedType = ( ParameterizedType ) genericType ; Type [ ] typeArguments = parameterizedType . getActualTypeArguments ( ) ; if ( typeArguments . length != 1 ) { throw new ConversionException ( "Types with more then one generic are not supported" ...
public class AbstractExcelWriter { /** * 获取属性名到标题单元格样式的映射 * @ return 返回属性名到标题单元格样式的映射 */ public Map < String , CellStyle > getTitleCellStyleMapping ( ) { } }
if ( null == this . titleCellStyleMapping ) { this . titleCellStyleMapping = new HashMap < String , CellStyle > ( 16 ) ; } return titleCellStyleMapping ;
public class JainMgcpStackImpl { /** * Closes the stack and it ' s underlying resources . */ public void close ( ) { } }
stopped = true ; try { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Closing socket" ) ; } // selector . close ( ) ; socket . close ( ) ; if ( this . channel != null ) { this . channel . close ( ) ; } for ( int i = 0 ; i < decodingThreads . length ; i ++ ) { decodingThreads [ i ] . shutdown ( ) ; } } catch ( E...
public class DataRow { /** * Returns this row in { @ link ObjectNode } representation . * @ return this row in { @ link ObjectNode } representation */ public JsonNode toJsonObject ( ) { } }
ObjectNode node = new ObjectMapper ( ) . createObjectNode ( ) ; if ( id != null ) { node . put ( "id" , id ) ; } for ( DataColumn column : columns ) { String value = content . get ( column ) ; if ( value != null ) { node . put ( column . getCode ( ) , value ) ; } else { node . put ( column . getCode ( ) , "" ) ; } } re...
public class Layout { /** * Do post exam of child inside the layout after it has been positioned in parent * @ param dataIndex data index */ protected void postLayoutChild ( final int dataIndex ) { } }
if ( ! mContainer . isDynamic ( ) ) { boolean visibleInLayout = ! mViewPort . isClippingEnabled ( ) || inViewPort ( dataIndex ) ; ViewPortVisibility visibility = visibleInLayout ? ViewPortVisibility . FULLY_VISIBLE : ViewPortVisibility . INVISIBLE ; Log . d ( Log . SUBSYSTEM . LAYOUT , TAG , "onLayout: child with dataI...
public class ISOBlueDemo { /** * Sends a message . * @ param message * A string of text to send . */ private void sendMessage ( org . isoblue . isobus . Message message ) { } }
// Check that we ' re actually connected before trying anything if ( mChatService . getState ( ) != BluetoothService . STATE_CONNECTED ) { Toast . makeText ( this , R . string . not_connected , Toast . LENGTH_SHORT ) . show ( ) ; return ; } // Get the message bytes and tell the BluetoothChatService to write mChatServic...
public class IntermediateResult { /** * Returns the partition with the given ID . * @ param resultPartitionId ID of the partition to look up * @ throws NullPointerException If partition ID < code > null < / code > * @ throws IllegalArgumentException Thrown if unknown partition ID * @ return Intermediate result ...
// Looks ups the partition number via the helper map and returns the // partition . Currently , this happens infrequently enough that we could // consider removing the map and scanning the partitions on every lookup . // The lookup ( currently ) only happen when the producer of an intermediate // result cannot be found...
public class CmsPrincipalSelection { /** * Opens the popup of this widget . < p > */ protected void open ( ) { } }
m_oldValue = m_selectionInput . m_textbox . getValue ( ) ; CmsEmbeddedDialogHandler handler = new CmsEmbeddedDialogHandler ( ) ; handler . setPrincipleSelectHandler ( new I_CmsPrincipalSelectHandler ( ) { public void selectPrincipal ( String principal ) { if ( ! getFormValue ( ) . equals ( principal ) ) { setFormValueA...
public class AsyncResponse { /** * 已字符串信息获取返回数据 * @ return */ public String getDataString ( ) { } }
if ( exception == null ) { try { if ( ! setDataString ) { dataString = EntityUtils . toString ( httpEntity , charset . charset ) ; setDataString = true ; } } catch ( IOException e ) { e . printStackTrace ( ) ; return null ; } } return dataString ;
public class Benchmark { /** * main program * creates a 1 - tps database : * i . e . 1 branch , 10 tellers , . . . * runs one TPC BM B transaction */ public void run ( String [ ] args ) { } }
String DriverName = "" ; String DBUrl = "" ; String DBUser = "" ; String DBPassword = "" ; boolean initialize_dataset = false ; for ( int i = 0 ; i < args . length ; i ++ ) { if ( args [ i ] . equals ( "-clients" ) ) { if ( i + 1 < args . length ) { i ++ ; n_clients = Integer . parseInt ( args [ i ] ) ; } } else if ( a...
public class ConciseSet { /** * { @ inheritDoc } */ public boolean contains ( int o ) { } }
if ( isEmpty ( ) || o > last || o < 0 ) { return false ; } // check if the element is within a literal word int block = maxLiteralLengthDivision ( o ) ; int bit = maxLiteralLengthModulus ( o ) ; for ( int i = 0 ; i <= lastWordIndex ; i ++ ) { final int w = words [ i ] ; final int t = w & 0xC0000000 ; // the first two b...
public class TilesOverlay { /** * Get the area we are drawing to * @ since 6.0.0 * @ return true if the tiles are to be drawn */ protected boolean setViewPort ( final Canvas pCanvas , final Projection pProjection ) { } }
setProjection ( pProjection ) ; getProjection ( ) . getMercatorViewPort ( mViewPort ) ; return true ;
public class ColtUtils { /** * Returns v = v1 + c * v2. * Useful in avoiding the need of the copy ( ) in the colt api . */ public static final DoubleMatrix1D add ( DoubleMatrix1D v1 , DoubleMatrix1D v2 , double c ) { } }
if ( v1 . size ( ) != v2 . size ( ) ) { throw new IllegalArgumentException ( "wrong vectors dimensions" ) ; } DoubleMatrix1D ret = DoubleFactory1D . dense . make ( v1 . size ( ) ) ; for ( int i = 0 ; i < ret . size ( ) ; i ++ ) { ret . setQuick ( i , v1 . getQuick ( i ) + c * v2 . getQuick ( i ) ) ; } return ret ;
public class KamSummarizer { /** * Summarize nodes and edges * @ param edges * @ param annotationStatements * @ return */ public static KamSummary summarizeKamNetwork ( Collection < KamEdge > edges , int statementCount ) { } }
KamSummary summary = new KamSummary ( ) ; Set < KamNode > nodes = new HashSet < KamNode > ( ) ; // unique set of nodes for ( KamEdge edge : edges ) { nodes . add ( edge . getSourceNode ( ) ) ; nodes . add ( edge . getTargetNode ( ) ) ; } summary . setNumOfBELStatements ( statementCount ) ; summary . setNumOfNodes ( nod...
public class SVGParser { /** * Parse stroke - linecap */ private static Style . LineCap parseStrokeLineCap ( String val ) { } }
if ( "butt" . equals ( val ) ) return Style . LineCap . Butt ; if ( "round" . equals ( val ) ) return Style . LineCap . Round ; if ( "square" . equals ( val ) ) return Style . LineCap . Square ; return null ;
public class DecoupledInjectedAttribute { /** * We use a factory method here because we will not be using the same buffer specified for this method , so we * require a bit of processing before actually calling a constructor ( not that this could not be done at the * constructor , but it gives us higher flexibility ...
final char [ ] newBuffer = new char [ nameLen + operatorLen + valueOuterLen ] ; System . arraycopy ( buffer , nameOffset , newBuffer , 0 , nameLen ) ; System . arraycopy ( buffer , operatorOffset , newBuffer , nameLen , operatorLen ) ; System . arraycopy ( buffer , valueOuterOffset , newBuffer , ( nameLen + operatorLen...
public class PDTWebDateHelper { /** * create a W3C Date Time representation of a date . * @ param aDateTime * Date to print . May not be < code > null < / code > . * @ return the W3C Date Time represented by the given Date . */ @ Nullable public static String getAsStringW3C ( @ Nullable final LocalDateTime aDateT...
if ( aDateTime == null ) return null ; return getAsStringW3C ( aDateTime . atOffset ( ZoneOffset . UTC ) ) ;
public class SwaggerBuilder { /** * Determines if this controller handler can be registered in the Swagger specification . * @ param route * @ param handler * @ return true if the controller handler can be registered in the Swagger specification */ protected boolean canRegister ( Route route , ControllerHandler h...
if ( ! METHODS . contains ( route . getRequestMethod ( ) . toUpperCase ( ) ) ) { log . debug ( "Skip {} {}, {} Swagger does not support specified HTTP method" , route . getRequestMethod ( ) , route . getUriPattern ( ) , Util . toString ( handler . getControllerMethod ( ) ) ) ; return false ; } List < String > produces ...
public class AlpineParser { /** * / * - - - Private methods - - - */ private DependencyInfo createDependencyInfo ( Package packageInfo ) { } }
DependencyInfo dependencyInfo = null ; if ( StringUtils . isNotBlank ( packageInfo . getPackageName ( ) ) && StringUtils . isNotBlank ( packageInfo . getVersion ( ) ) && StringUtils . isNotBlank ( packageInfo . getArchitecture ( ) ) ) { dependencyInfo = new DependencyInfo ( null , MessageFormat . format ( ALPINE_PACKAG...
public class KafkaClient { /** * Sends a message asynchronously , specifying { @ link ProducerType } . * This methods returns the underlying Kafka producer ' s output directly to * caller , not converting { @ link RecordMetadata } to { @ link KafkaMessage } . * @ param type * @ param message * @ param callbac...
String key = message . key ( ) ; ProducerRecord < String , byte [ ] > record = StringUtils . isEmpty ( key ) ? new ProducerRecord < > ( message . topic ( ) , message . content ( ) ) : new ProducerRecord < > ( message . topic ( ) , key , message . content ( ) ) ; KafkaProducer < String , byte [ ] > producer = getJavaPro...
public class CmsSecurityManager { /** * Undos all changes in the resource by restoring the version from the * online project to the current offline project . < p > * @ param context the current request context * @ param resource the name of the resource to apply this operation to * @ param mode the undo mode , ...
CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; try { checkOfflineProject ( dbc ) ; checkPermissions ( dbc , resource , CmsPermissionSet . ACCESS_WRITE , true , CmsResourceFilter . ALL ) ; checkSystemLocks ( dbc , resource ) ; m_driverManager . undoChanges ( dbc , resource , mode ) ; } catch ( Except...
public class Type { /** * Returns the descriptor corresponding to the given class . * @ param clazz an object class , a primitive class or an array class . * @ return the descriptor corresponding to the given class . */ public static String getDescriptor ( final Class < ? > clazz ) { } }
StringBuilder stringBuilder = new StringBuilder ( ) ; appendDescriptor ( stringBuilder , clazz ) ; return stringBuilder . toString ( ) ;
public class MonitorEndpointHelper { /** * Verify access to a JMS backout queue by browsing the backout queue and ensure that no messages exists . * @ param queueName * @ return */ public static String pingJmsBackoutQueue ( MuleContext muleContext , String queueName ) { } }
return pingJmsBackoutQueue ( muleContext , DEFAULT_MULE_JMS_CONNECTOR , queueName ) ;
public class Config { /** * Sets the map of AtomicReference configurations , mapped by config name . * The config name may be a pattern with which the configuration will be obtained in the future . * @ param atomicReferenceConfigs the AtomicReference configuration map to set * @ return this config instance */ pub...
this . atomicReferenceConfigs . clear ( ) ; this . atomicReferenceConfigs . putAll ( atomicReferenceConfigs ) ; for ( Entry < String , AtomicReferenceConfig > entry : atomicReferenceConfigs . entrySet ( ) ) { entry . getValue ( ) . setName ( entry . getKey ( ) ) ; } return this ;
public class OWLLiteralImplString_CustomFieldSerializer { /** * Deserializes the content of the object from the * { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } . * @ param streamReader the { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } to read the ...
deserialize ( streamReader , instance ) ;
public class RootAction { @ Execute public HtmlResponse index ( ) { } }
if ( isLoginRequired ( ) ) { return redirectToLogin ( ) ; } return asHtml ( virtualHost ( path_IndexJsp ) ) . useForm ( SearchForm . class , op -> { op . setup ( form -> { buildFormParams ( form ) ; } ) ; } ) . renderWith ( data -> { buildInitParams ( ) ; RenderDataUtil . register ( data , "notification" , fessConfig ....
public class JSONConverter { /** * Encode an ObjectInstanceWrapper instance as JSON : * " objectName " : ObjectName , * " className " : String , * " URL " : URL , * @ param out The stream to write JSON to * @ param value The ObjectInstanceWrapper instance to encode . * The value and value . objectInstance c...
// ObjectInstance has no known sub - class . writeStartObject ( out ) ; writeObjectNameField ( out , OM_OBJECTNAME , value . objectInstance . getObjectName ( ) ) ; writeStringField ( out , OM_CLASSNAME , value . objectInstance . getClassName ( ) ) ; writeStringField ( out , OM_URL , value . mbeanInfoURL ) ; writeEndObj...
public class DescribeHyperParameterTuningJobRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeHyperParameterTuningJobRequest describeHyperParameterTuningJobRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeHyperParameterTuningJobRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeHyperParameterTuningJobRequest . getHyperParameterTuningJobName ( ) , HYPERPARAMETERTUNINGJOBNAME_BINDING ) ; } catch ( Exception e ) { th...
public class PublicIPPrefixesInner { /** * Deletes the specified public IP prefix . * @ param resourceGroupName The name of the resource group . * @ param publicIpPrefixName The name of the PublicIpPrefix . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException th...
beginDeleteWithServiceResponseAsync ( resourceGroupName , publicIpPrefixName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ResponseStore { /** * Automatically inject any { @ link ResponseStoreListener } s , which are implementations of * { @ link ResponseListener } so they can be notified of changes . * @ param collection of { @ link ResponseListener } s that are injected to be * listeners on the { @ link ResponseStore }...
for ( ResponseListener listener : listeners ) { registerListener ( listener ) ; }
public class ClassIndex { /** * Retrieves a list of subclasses of the given class . * The class must be annotated with { @ link IndexSubclasses } for it ' s subclasses to be indexed * at compile - time by { @ link ClassIndexProcessor } . * @ param superClass class to find subclasses for * @ return list of subcl...
return getSubclasses ( superClass , Thread . currentThread ( ) . getContextClassLoader ( ) ) ;
public class DateTimeExtensions { /** * Returns a { @ link java . time . Period } between the first day of this year ( inclusive ) and the first day of the * provided { @ link java . time . Year } ( exclusive ) . * @ param self a Year * @ param year another Year * @ return a Period between the Years * @ since...
return Period . between ( self . atDay ( 1 ) , year . atDay ( 1 ) ) ;
public class Automounter { /** * Cleanup all references from the { @ link MountOwner } . Cleanup any mounted entries that become un - referenced in the process . * @ param owner { @ link MountOwner } to cleanup references for */ public static void cleanup ( MountOwner owner ) { } }
final Set < RegistryEntry > references = ownerReferences . remove ( owner ) ; if ( references != null ) { for ( RegistryEntry entry : references ) { entry . removeInboundReference ( owner ) ; } } owner . onCleanup ( ) ;
public class BugResolution { /** * Runs the < CODE > BugResolution < / CODE > on the given < CODE > IMarker < / CODE > . * The < CODE > IMarker < / CODE > has to be a FindBugs marker . The * < CODE > BugInstance < / CODE > associated to the < CODE > IMarker < / CODE > will be * repaired . All exceptions are repor...
requireNonNull ( marker , "marker" ) ; try { // do NOT inline this method invocation runInternal ( marker ) ; } catch ( CoreException e ) { reportException ( e ) ; }