signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Postfach { /** * Liefert die einzelnen Attribute eines Postfaches als Map . * @ return Attribute als Map */ @ Override public Map < String , Object > toMap ( ) { } }
Map < String , Object > map = new HashMap < > ( ) ; map . put ( "plz" , getPLZ ( ) ) ; map . put ( "ortsname" , getOrtsname ( ) ) ; if ( nummer != null ) { map . put ( "nummer" , nummer ) ; } return map ;
public class BuildTasksInner { /** * Creates a build task for a container registry with the specified parameters . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param buildTaskName The name of th...
return ServiceFuture . fromResponse ( beginCreateWithServiceResponseAsync ( resourceGroupName , registryName , buildTaskName , buildTaskCreateParameters ) , serviceCallback ) ;
public class LNGBooleanVector { /** * Grows the vector to a new size and initializes the new elements with a given value . * @ param size the new size * @ param pad the value for new elements */ public void growTo ( int size , boolean pad ) { } }
if ( this . size >= size ) return ; this . ensure ( size ) ; for ( int i = this . size ; i < size ; i ++ ) this . elements [ i ] = pad ; this . size = size ;
public class MessageBuilder { /** * Creates a DISCONNECTED message . * @ param serverId the ID of the disconnected peer . * @ return a protobuf message . */ public static Message buildDisconnected ( String serverId ) { } }
Disconnected dis = Disconnected . newBuilder ( ) . setServerId ( serverId ) . build ( ) ; return Message . newBuilder ( ) . setType ( MessageType . DISCONNECTED ) . setDisconnected ( dis ) . build ( ) ;
public class DefaultProcessExecutor { /** * This function parsers the command and converts to a command array . * @ param configurationHolder * The configuration holder used when invoking the process * @ param command * The command to parse * @ return The parsed command as an array */ protected List < String ...
// init list List < String > commandList = new LinkedList < String > ( ) ; StringBuilder buffer = new StringBuilder ( command ) ; String part = null ; int quoteIndex = - 1 ; int spaceIndex = - 1 ; int length = - 1 ; do { quoteIndex = buffer . indexOf ( "\"" ) ; spaceIndex = buffer . indexOf ( " " ) ; if ( quoteIndex ==...
public class QueryExpression { /** * Sets the scope to SESSION for the QueryExpression object that creates * the table */ void setReturningResultSet ( ) { } }
if ( unionCorresponding ) { persistenceScope = TableBase . SCOPE_SESSION ; columnMode = TableBase . COLUMNS_UNREFERENCED ; return ; } leftQueryExpression . setReturningResultSet ( ) ;
public class Step { /** * Save value in memory using default target key ( Page key + field ) . * @ param field * is name of the field to retrieve . * @ param page * is target page . * @ throws TechnicalException * is thrown if you have a technical error ( format , configuration , datas , . . . ) in NoraUi ....
logger . debug ( "saveValueInStep: {} in {}." , field , page . getApplication ( ) ) ; saveElementValue ( field , page . getPageKey ( ) + field , page ) ;
public class ExtendedData { /** * Retrieves a long value from the extended data . * @ param type Type identifier * @ return long value */ public long getLong ( Integer type ) { } }
long result = 0 ; byte [ ] item = m_map . get ( type ) ; if ( item != null ) { result = MPPUtility . getLong6 ( item , 0 ) ; } return ( result ) ;
public class RaftPartition { /** * Deletes the partition . * @ return future to be completed once the partition has been deleted */ public CompletableFuture < Void > delete ( ) { } }
return server . stop ( ) . thenCompose ( v -> client . stop ( ) ) . thenRun ( ( ) -> { if ( server != null ) { server . delete ( ) ; } } ) ;
public class Maps { /** * Grabs the first value from a tree map ( Navigable map ) . */ public static < K , V > V first ( NavigableMap < K , V > map ) { } }
return map . firstEntry ( ) . getValue ( ) ;
public class JsHttpRequest { /** * [ ] or [ { name : . . . , value : . . . } , { name : . . . , value : . . . } ] */ public @ Nullable Scriptable jsFunction_headers ( String name ) { } }
Context cx = Context . getCurrentContext ( ) ; Header [ ] hs = req . getHeaders ( name ) ; Scriptable result = RHINO . newArray ( cx , getParentScope ( ) ) ; int i = 0 ; for ( Header h : hs ) { Scriptable jsh = makeJsHeader ( cx , h ) ; RHINO . putProperty ( result , i ++ , jsh ) ; } return result ;
public class AttributesManager { /** * Sets session attributes , replacing any existing attributes already present in the session . An exception is thrown * if this method is called while processing an out of session request . Use this method when bulk replacing attributes * is desired . * @ param sessionAttribut...
if ( requestEnvelope . getSession ( ) == null ) { throw new IllegalStateException ( "Attempting to set session attributes for out of session request" ) ; } this . sessionAttributes = sessionAttributes ;
public class RepositoryPersistor { /** * Read metadata by populating an instance of the target class * using SAXParser . */ private Object readMetadataFromXML ( InputSource source , Class target ) throws MalformedURLException , ParserConfigurationException , SAXException , IOException { } }
// TODO : make this configurable boolean validate = false ; // get a xml reader instance : SAXParserFactory factory = SAXParserFactory . newInstance ( ) ; log . info ( "RepositoryPersistor using SAXParserFactory : " + factory . getClass ( ) . getName ( ) ) ; if ( validate ) { factory . setValidating ( true ) ; } SAXPar...
public class SystemParameter { /** * < pre > * Define the URL query parameter name to use for the parameter . It is case * sensitive . * < / pre > * < code > string url _ query _ parameter = 3 ; < / code > */ public java . lang . String getUrlQueryParameter ( ) { } }
java . lang . Object ref = urlQueryParameter_ ; if ( ref instanceof java . lang . String ) { return ( java . lang . String ) ref ; } else { com . google . protobuf . ByteString bs = ( com . google . protobuf . ByteString ) ref ; java . lang . String s = bs . toStringUtf8 ( ) ; urlQueryParameter_ = s ; return s ; }
public class KeyVaultClientBaseImpl { /** * Creates or updates a new SAS definition for the specified storage account . This operation requires the storage / setsas permission . * @ param vaultBaseUrl The vault name , for example https : / / myvault . vault . azure . net . * @ param storageAccountName The name of t...
return ServiceFuture . fromResponse ( setSasDefinitionWithServiceResponseAsync ( vaultBaseUrl , storageAccountName , sasDefinitionName , templateUri , sasType , validityPeriod , sasDefinitionAttributes , tags ) , serviceCallback ) ;
public class Condition { /** * < p > Sample : < code > $ ( " # mydiv " ) . shouldHave ( attribute ( " fileId " , " 12345 " ) ) ; < / code > < / p > * @ param attributeName name of attribute * @ param expectedAttributeValue expected value of attribute */ public static Condition attribute ( final String attributeName...
return new Condition ( "attribute" ) { @ Override public boolean apply ( Driver driver , WebElement element ) { return expectedAttributeValue . equals ( getAttributeValue ( element , attributeName ) ) ; } @ Override public String toString ( ) { return name + " " + attributeName + '=' + expectedAttributeValue ; } } ;
public class DescribeUploadBufferRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeUploadBufferRequest describeUploadBufferRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeUploadBufferRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeUploadBufferRequest . getGatewayARN ( ) , GATEWAYARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request...
public class AmBaseSpout { /** * Continually called method by Storm that gets next message . < br > * < br > * When spout is running , this method is endlessly called . */ @ Override public void nextTuple ( ) { } }
if ( this . reloadConfig && this . watcher != null ) { Map < String , Object > reloadedConfig = null ; try { reloadedConfig = this . watcher . readIfUpdated ( ) ; } catch ( IOException ex ) { String logFormat = "Config file reload failed. Skip reload config." ; logger . warn ( logFormat , ex ) ; } if ( reloadedConfig !...
public class WebFluxLinkBuilder { /** * Returns a { @ link UriComponentsBuilder } obtained from the { @ link ServerWebExchange } . * @ param exchange */ private static UriComponentsBuilder getBuilder ( @ Nullable ServerWebExchange exchange ) { } }
return exchange == null ? UriComponentsBuilder . fromPath ( "/" ) : UriComponentsBuilder . fromHttpRequest ( exchange . getRequest ( ) ) ;
public class DerInputStream { /** * Get a Generalized encoded time value from the input stream . */ public Date getGeneralizedTime ( ) throws IOException { } }
if ( buffer . read ( ) != DerValue . tag_GeneralizedTime ) throw new IOException ( "DER input, GeneralizedTime tag invalid " ) ; return buffer . getGeneralizedTime ( getLength ( buffer ) ) ;
public class DescribeLifecycleHooksRequest { /** * The names of one or more lifecycle hooks . If you omit this parameter , all lifecycle hooks are described . * @ return The names of one or more lifecycle hooks . If you omit this parameter , all lifecycle hooks are described . */ public java . util . List < String > ...
if ( lifecycleHookNames == null ) { lifecycleHookNames = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return lifecycleHookNames ;
public class IterateExample { public static void main ( String [ ] args ) throws Exception { } }
// Checking input parameters final ParameterTool params = ParameterTool . fromArgs ( args ) ; // set up input for the stream of integer pairs // obtain execution environment and set setBufferTimeout to 1 to enable // continuous flushing of the output buffers ( lowest latency ) StreamExecutionEnvironment env = StreamExe...
public class NormalizeUtils { /** * It normalizes a { @ code value } in a range [ { @ code a } , { @ code b } ] given a { @ code min } and { @ code max } value . * The equation used here were based on the following links : * < ul > * < li > { @ link https : / / stats . stackexchange . com / a / 281165 } < / li > ...
if ( max == min ) { throw new JMetalException ( "The max minus min should not be zero" ) ; } return minRangeValue + ( ( ( value - min ) * ( maxRangeValue - minRangeValue ) ) / ( max - min ) ) ;
public class MenuParser { /** * Get rid of the extra HTML code . * @ param strText * @ return */ public static String stripTopLevelTag ( String strText , String strTag ) { } }
int iStart = MenuParser . getFirstNonWhitespace ( strText ) ; int iEnd = MenuParser . getLastNonWhitespace ( strText ) ; if ( ( iStart != - 1 ) && ( iEnd != - 1 ) ) { String strStartTag = Utility . startTag ( strTag ) ; String strEndTag = Utility . endTag ( strTag ) ; if ( strText . substring ( iStart , iStart + strSta...
public class DefaultGeometryIndexControllerFactory { @ Override public MapController create ( GeometryEditService editService , GeometryIndex index ) throws GeometryIndexNotFoundException { } }
if ( index == null ) { return null ; } switch ( editService . getIndexService ( ) . getType ( index ) ) { case TYPE_VERTEX : return createVertexController ( editService , index ) ; case TYPE_EDGE : return createEdgeController ( editService , index ) ; default : return null ; }
public class GeometryRendererImpl { /** * Renders a line from the last inserted point to the current mouse position , indicating what the new situation * would look like if a vertex where to be inserted at the mouse location . */ public void onTentativeMove ( GeometryEditTentativeMoveEvent event ) { } }
try { Coordinate [ ] vertices = editService . getIndexService ( ) . getSiblingVertices ( editService . getGeometry ( ) , editService . getInsertIndex ( ) ) ; String geometryType = editService . getIndexService ( ) . getGeometryType ( editService . getGeometry ( ) , editService . getInsertIndex ( ) ) ; if ( vertices != ...
public class DataSessionReader { /** * Retrieve the previous page from the Twilio API . * @ param page current page * @ param client TwilioRestClient with which to make the request * @ return Previous Page */ @ Override public Page < DataSession > previousPage ( final Page < DataSession > page , final TwilioRestC...
Request request = new Request ( HttpMethod . GET , page . getPreviousPageUrl ( Domains . WIRELESS . toString ( ) , client . getRegion ( ) ) ) ; return pageForRequest ( client , request ) ;
public class AbcGrammar { /** * xcom - indent : : = " indent " 1 * WSP xcom - number xcom - unit */ Rule XcomIndent ( ) { } }
return Sequence ( String ( "indent" ) , OneOrMore ( WSP ( ) ) . suppressNode ( ) , XcomNumber ( ) , XcomUnit ( ) ) . label ( XcomIndent ) ;
public class PlanAssembler { /** * Turn sequential scan to index scan for group by if possible */ private AbstractPlanNode indexAccessForGroupByExprs ( SeqScanPlanNode root , IndexGroupByInfo gbInfo ) { } }
if ( ! root . isPersistentTableScan ( ) ) { // subquery and common tables are not handled return root ; } String fromTableAlias = root . getTargetTableAlias ( ) ; assert ( fromTableAlias != null ) ; List < ParsedColInfo > groupBys = m_parsedSelect . groupByColumns ( ) ; Table targetTable = m_catalogDb . getTables ( ) ....
public class DynamicTokenBucket { /** * Request tokens . Like { @ link # getPermitsAndDelay ( long , long , long ) } but block until the wait time passes . */ public long getPermits ( long requestedPermits , long minPermits , long timeoutMillis ) { } }
PermitsAndDelay permitsAndDelay = getPermitsAndDelay ( requestedPermits , minPermits , timeoutMillis ) ; if ( permitsAndDelay . delay > 0 ) { try { Thread . sleep ( permitsAndDelay . delay ) ; } catch ( InterruptedException ie ) { return 0 ; } } return permitsAndDelay . permits ;
public class CleaneLingSolver { /** * Performs resolution on two given clauses and a pivot literal . * @ param c the first clause * @ param pivot the pivot literal * @ param d the second clause */ private void doResolve ( final CLClause c , final int pivot , final CLClause d ) { } }
assert ! c . dumped ( ) && ! c . satisfied ( ) ; assert ! d . dumped ( ) && ! d . satisfied ( ) ; assert this . addedlits . empty ( ) ; this . stats . steps ++ ; for ( int i = 0 ; i < c . lits ( ) . size ( ) ; i ++ ) { final int lit = c . lits ( ) . get ( i ) ; if ( lit != pivot ) { this . addedlits . push ( lit ) ; } ...
public class ListFiles { /** * / * ( non - Javadoc ) */ File printHeader ( File directory ) { } }
System . out . printf ( "Listing contents for directory [%s]...%n%n" , directory . getAbsolutePath ( ) ) ; return directory ;
public class BosClient { /** * Copies a source object to a new destination in Bos . * @ param request The request object containing all the options for copying an Bos object . * @ return A CopyObjectResponse object containing the information returned by Bos for the newly created object . */ public CopyObjectRespons...
checkNotNull ( request , "request should not be null." ) ; assertStringNotNullOrEmpty ( request . getSourceKey ( ) , "object key should not be null or empty" ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT ) ; String copySourceHeader = "/" + request . getSourceBucketName ( ) ...
public class RestService { /** * { @ inheritDoc } */ @ Override public synchronized void start ( StartContext startContext ) throws StartException { } }
RestServerConfigurationBuilder builder = new RestServerConfigurationBuilder ( ) ; builder . name ( serverName ) . extendedHeaders ( extendedHeaders ) . ignoredCaches ( ignoredCaches ) . contextPath ( contextPath ) . maxContentLength ( maxContentLength ) . compressionLevel ( compressionLevel ) ; EncryptableServiceHelper...
public class BigQueryDataMarshallerByType { /** * Asserts that a field annotated as { @ link BigQueryFieldMode # REPEATED } is not left null . */ private void assertFieldValue ( Field field , Object fieldValue ) { } }
if ( fieldValue == null && isFieldRequired ( field ) ) { throw new IllegalArgumentException ( "Non-nullable field " + field . getName ( ) + ". This field is either annotated as REQUIRED or is a primitive type." ) ; }
public class BatchWorker { /** * Schedule task in thread pool . * If pool reject task - task will execute immediately in current thread . * If pool is shutdown - task will not run , but finalizer will executed . * @ param name Task name for debug * @ param task Task runnable * @ param finalizer Finalizer to e...
if ( pool . isShutdown ( ) ) { log . warn ( "Thread pool is shutdown" ) ; if ( finalizer != null ) { finalizer . run ( ) ; } return ; } if ( ! pooled ) { log . debug ( "Begin: " + name ) ; try { task . run ( ) ; } catch ( Throwable e ) { log . error ( "Execute exception: " + e ) ; if ( finalizer != null ) { finalizer ....
public class AmazonChimeClient { /** * Retrieves details for the specified phone number order , such as order creation timestamp , phone numbers in E . 164 * format , product type , and order status . * @ param getPhoneNumberOrderRequest * @ return Result of the GetPhoneNumberOrder operation returned by the servi...
request = beforeClientExecution ( request ) ; return executeGetPhoneNumberOrder ( request ) ;
public class PidfileIterator { /** * { @ inheritDoc } */ public String next ( ) { } }
if ( ! hasNext ( ) ) { throw new NoSuchElementException ( ) ; } String result = nextLine ; nextLine = null ; fillNextLine ( ) ; return result ;
public class ExpiringResourceClaim { /** * Claim a resource . * @ param zooKeeperConnection ZooKeeper connection to use . * @ param poolSize Size of the resource pool . * @ param znode Root znode of the ZooKeeper resource - pool . * @ param timeout Delay in milliseconds before the claim expires . * @ return A...
long timeoutNonNull = timeout == null ? DEFAULT_TIMEOUT : timeout ; logger . debug ( "Preparing expiring resource-claim; will release it in {}ms." , timeout ) ; return new ExpiringResourceClaim ( zooKeeperConnection , poolSize , znode , timeoutNonNull ) ;
public class JwkDefinitionSource { /** * Returns the JWK definition matching the provided keyId ( & quot ; kid & quot ; ) . * If the JWK definition is not available in the internal cache then { @ link # loadJwkDefinitions ( URL ) } * will be called ( to re - load the cache ) and then followed - up with a second att...
JwkDefinitionHolder result = this . getDefinition ( keyId ) ; if ( result != null ) { return result ; } synchronized ( this . jwkDefinitions ) { result = this . getDefinition ( keyId ) ; if ( result != null ) { return result ; } this . jwkDefinitions . clear ( ) ; for ( URL jwkSetUrl : jwkSetUrls ) { this . jwkDefiniti...
public class WordVectorSerializer { /** * This method saves ParagraphVectors model into compressed zip file * @ param file */ public static void writeParagraphVectors ( ParagraphVectors vectors , File file ) { } }
try ( FileOutputStream fos = new FileOutputStream ( file ) ; BufferedOutputStream stream = new BufferedOutputStream ( fos ) ) { writeParagraphVectors ( vectors , stream ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; }
public class ConciseSet { /** * { @ inheritDoc } */ @ Override public void complement ( ) { } }
modCount ++ ; if ( isEmpty ( ) ) { return ; } if ( last == ConciseSetUtils . MIN_ALLOWED_SET_BIT ) { clear ( ) ; return ; } // update size if ( size >= 0 ) { size = last - size + 1 ; } // complement each word for ( int i = 0 ; i <= lastWordIndex ; i ++ ) { int w = words [ i ] ; if ( isLiteral ( w ) ) // negate the bits...
public class Util { /** * Checks whether the given java element is a Java class file . * @ param elt * The resource to check . * @ return < code > true < / code > if the given resource is a class file , * < code > false < / code > otherwise . */ public static boolean isClassFile ( IJavaElement elt ) { } }
if ( elt == null ) { return false ; } return elt instanceof IClassFile || elt instanceof ICompilationUnit ;
public class KrakenImpl { /** * Query implementation for multiple result with the parsed query . */ private void findStreamLocal ( QueryKraken query , Object [ ] args , ResultStream < Cursor > result ) { } }
try { TableKraken table = query . table ( ) ; TableKelp tableKelp = table . getTableKelp ( ) ; RowCursor cursor = tableKelp . cursor ( ) ; query . fillKey ( cursor , args ) ; query . findStream ( result , args ) ; } catch ( Exception e ) { result . fail ( e ) ; }
public class HttpUtils { /** * Close the response . * @ param response the response to close */ public static void close ( final HttpResponse response ) { } }
if ( response instanceof CloseableHttpResponse ) { val closeableHttpResponse = ( CloseableHttpResponse ) response ; try { closeableHttpResponse . close ( ) ; } catch ( final IOException e ) { LOGGER . error ( e . getMessage ( ) , e ) ; } }
public class AmazonEC2Client { /** * Describes Reserved Instance offerings that are available for purchase . With Reserved Instances , you purchase the * right to launch instances for a period of time . During that time period , you do not receive insufficient capacity * errors , and you pay a lower usage rate than...
request = beforeClientExecution ( request ) ; return executeDescribeReservedInstancesOfferings ( request ) ;
public class CmsRequestUtil { /** * Appends a request parameter to the given URL . < p > * This method takes care about the adding the parameter as an additional * parameter ( appending < code > & param = value < / code > ) or as the first parameter * ( appending < code > ? param = value < / code > ) . < p > * ...
if ( CmsStringUtil . isEmpty ( url ) ) { return null ; } int pos = url . indexOf ( URL_DELIMITER ) ; StringBuffer result = new StringBuffer ( 256 ) ; result . append ( url ) ; if ( pos >= 0 ) { // url already has parameters result . append ( PARAMETER_DELIMITER ) ; } else { // url does not have parameters result . appe...
public class AddAdCustomizer { /** * Runs the example . * @ param adWordsServices the services factory . * @ param session the session . * @ param adGroupIds IDs of the ad groups for which ad customizers will be created . * @ param feedName the name of the ad customizer feed to create . * @ throws ApiExceptio...
// Create a customizer feed . One feed per account can be used for all ads . AdCustomizerFeed adCustomizerFeed = createCustomizerFeed ( adWordsServices , session , feedName ) ; // Add feed items containing the values we ' d like to place in ads . createCustomizerFeedItems ( adWordsServices , session , adGroupIds , adCu...
public class CausticUtil { /** * Gets the { @ link java . io . InputStream } ' s data as a { @ link java . nio . ByteBuffer } . The image data reading is done according to the { @ link com . flowpowered . caustic . api . gl . Texture . Format } . The image size is * stored in the passed { @ link Rectangle } instance ...
try { final BufferedImage image = ImageIO . read ( source ) ; size . setSize ( image . getWidth ( ) , image . getHeight ( ) ) ; return getImageData ( image , format ) ; } catch ( IOException ex ) { throw new IllegalStateException ( "Unreadable texture image data" , ex ) ; }
public class EditPlaylistEntry { /** * This method is called from within the constructor to * initialize the form . */ private void initialize ( ) { } }
java . awt . GridBagConstraints gridBagConstraints ; getContentPane ( ) . setLayout ( new java . awt . GridBagLayout ( ) ) ; jLabel1 = new javax . swing . JLabel ( ) ; jLabel1 . setText ( "Old:" ) ; jLabel1 . setFont ( Helpers . getDialogFont ( ) ) ; gridBagConstraints = new java . awt . GridBagConstraints ( ) ; gridBa...
public class TerminalEmulatorDeviceConfiguration { /** * Copies the current configuration . The new object has the given value . * @ param cursorBlinking Should the terminal text cursor blink ? * @ return A copy of the current configuration with the changed value . */ public TerminalEmulatorDeviceConfiguration with...
if ( this . cursorBlinking == cursorBlinking ) { return this ; } else { return new TerminalEmulatorDeviceConfiguration ( this . lineBufferScrollbackSize , this . blinkLengthInMilliSeconds , this . cursorStyle , this . cursorColor , cursorBlinking , this . clipboardAvailable ) ; }
public class DateGroovyMethods { /** * Increment a Calendar by one day . * @ param self a Calendar * @ return a new Calendar set to the next day * @ since 1.8.7 */ public static Calendar next ( Calendar self ) { } }
Calendar result = ( Calendar ) self . clone ( ) ; result . add ( Calendar . DAY_OF_YEAR , 1 ) ; return result ;
public class TaskDefinitionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( TaskDefinition taskDefinition , ProtocolMarshaller protocolMarshaller ) { } }
if ( taskDefinition == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( taskDefinition . getTaskDefinitionArn ( ) , TASKDEFINITIONARN_BINDING ) ; protocolMarshaller . marshall ( taskDefinition . getContainerDefinitions ( ) , CONTAINERDEFINITI...
public class CmsSystemConfiguration { /** * Adds the event manager class . < p > * @ param clazz the class name of event manager class to instantiate and add */ public void addEventManager ( String clazz ) { } }
try { m_eventManager = ( CmsEventManager ) Class . forName ( clazz ) . newInstance ( ) ; if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_EVENTMANAGER_CLASS_SUCCESS_1 , m_eventManager ) ) ; } } catch ( Throwable t ) { LOG . error ( Messages . g...
public class DataExpressionHandler { /** * This method returns the data value associated with the requested data * source and key . . * @ param trace The trace * @ param node The node * @ param direction The direction * @ param headers The optional headers * @ param values The values * @ return The requir...
if ( source == DataSource . Content ) { return values [ index ] ; } else if ( source == DataSource . Header ) { return headers . get ( key ) ; } return null ;
public class AtlasRegistry { /** * Stop the scheduler reporting Atlas data . */ public void stop ( ) { } }
if ( scheduler != null ) { scheduler . shutdown ( ) ; scheduler = null ; logger . info ( "stopped collecting metrics every {}ms reporting to {}" , step , uri ) ; } else { logger . warn ( "registry stopped, but was never started" ) ; }
public class Product { /** * Sets the productType value for this Product . * @ param productType * The type of { @ code Product } . This will always be { @ link ProductType # DFP } * for programmatic * guaranteed products . * < span class = " constraint ReadOnly " > This attribute is * read - only when : < ul...
this . productType = productType ;
public class CPSpecificationOptionLocalServiceUtil { /** * Returns the cp specification option matching the UUID and group . * @ param uuid the cp specification option ' s UUID * @ param groupId the primary key of the group * @ return the matching cp specification option , or < code > null < / code > if a matchin...
return getService ( ) . fetchCPSpecificationOptionByUuidAndGroupId ( uuid , groupId ) ;
public class ListApplicationSnapshotsResult { /** * A collection of objects containing information about the application snapshots . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setSnapshotSummaries ( java . util . Collection ) } or { @ link # withSnapshot...
if ( this . snapshotSummaries == null ) { setSnapshotSummaries ( new java . util . ArrayList < SnapshotDetails > ( snapshotSummaries . length ) ) ; } for ( SnapshotDetails ele : snapshotSummaries ) { this . snapshotSummaries . add ( ele ) ; } return this ;
public class ReflectionUtils { /** * 通过反射 , 获得Class定义中声明的父类的泛型参数的类型 . * 如无法找到 , 返回Object . class . * 如public UserDao extends HibernateDao < User , Long > * @ param clazz clazz The class to introspect * @ param index the Index of the generic ddeclaration , start from 0. * @ return the index generic declaration...
Type genType = clazz . getGenericSuperclass ( ) ; if ( ! ( genType instanceof ParameterizedType ) ) { /* * By Hilbert Wang @ 2015-3-8 * logger . info ( clazz . getSimpleName ( ) + " ' s superclass not ParameterizedType " ) ; */ return Object . class ; } Type [ ] params = ( ( ParameterizedType ) genType ) . getActualT...
public class Mail { /** * Add a header to the email . * @ param key the header ' s key . * @ param value the header ' s value . */ public void addHeader ( String key , String value ) { } }
this . headers = addToMap ( key , value , this . headers ) ;
public class XData { /** * stores a datanode in a xdata file using the given marshallers . For all classes other * than these a special marshaller is required to map the class ' data to a data node * deSerializedObject : * < ul > * < li > Boolean < / li > * < li > Long < / li > * < li > Integer < / li > *...
store ( node , new FileOutputStream ( file ) , addChecksum , ignoreMissingMarshallers , progressListener , marshallers ) ;
public class PoolImplThreadSafe { /** * F96377 */ private int drainToSize ( int minPooled , int maxDiscard ) { } }
// Stop draining if we have reached the maximum drain amount . // This slows the drain process , allowing for the pool to become // active before becoming fully drained ( to minimum level ) . int numDiscarded = 0 ; Object o = null ; while ( numDiscarded < maxDiscard ) { o = buffer . popWithLimit ( minPooled ) ; if ( o ...
public class AWSGlueClient { /** * Starts an existing trigger . See < a href = " http : / / docs . aws . amazon . com / glue / latest / dg / trigger - job . html " > Triggering * Jobs < / a > for information about how different types of trigger are started . * @ param startTriggerRequest * @ return Result of the ...
request = beforeClientExecution ( request ) ; return executeStartTrigger ( request ) ;
public class CPCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . CPC__DEF_CHAR_ID : setDefCharID ( ( String ) newValue ) ; return ; case AfplibPackage . CPC__PRT_FLAGS : setPrtFlags ( ( Integer ) newValue ) ; return ; case AfplibPackage . CPC__CPIRG_LEN : setCPIRGLen ( ( Integer ) newValue ) ; return ; case AfplibPackage . CPC__VS_CHAR_SN ...
public class StringUtils { /** * Get mininum of three values . * @ param a number a * @ param b number b * @ param c number c * @ return the minimum */ private static int minimum ( int a , int b , int c ) { } }
int minValue ; minValue = a ; if ( b < minValue ) { minValue = b ; } if ( c < minValue ) { minValue = c ; } return minValue ;
public class HttpRequest { /** * 将请求参数转换成String , 字符串格式为 : bean1 = { } & amp ; id = 13 & amp ; name = xxx < br > * 不会返回null , 没有参数返回空字符串 * @ param prefix 拼接前缀 , 如果无参数 , 返回的字符串不会含有拼接前缀 * @ return String */ public String getParametersToString ( String prefix ) { } }
final StringBuilder sb = new StringBuilder ( ) ; getParameters ( ) . forEach ( ( k , v ) -> { if ( sb . length ( ) > 0 ) sb . append ( '&' ) ; try { sb . append ( k ) . append ( '=' ) . append ( URLEncoder . encode ( v , "UTF-8" ) ) ; } catch ( IOException ex ) { throw new RuntimeException ( ex ) ; } } ) ; return ( sb ...
public class MultiUserChat { /** * Grants ownership privileges to other users . Room owners may grant ownership privileges . * Some room implementations will not allow to grant ownership privileges to other users . * An owner is allowed to change defining room features as well as perform all administrative * func...
changeAffiliationByAdmin ( jids , MUCAffiliation . owner ) ;
public class Java { /** * Create the source file for a given class * @ param clazz is the class description * @ throws java . io . IOException */ public static synchronized void createSource ( Java . _ClassBody clazz ) throws IOException { } }
if ( baseDir == null ) { throw new IOException ( "Base directory for output not set, use 'setBaseDirectory'" ) ; } String pkg = clazz . getPackage ( ) ; if ( pkg == null ) { pkg = "" ; // throw new IOException ( " Class package cannot be null " ) ; } pkg = pkg . replace ( '.' , '/' ) ; File path = new File ( baseDir , ...
public class PullFilter { /** * < p > Generate a string representation of this { @ code Filter } object * that is consistent for a given name and parameter set . < / p > * < p > The string is not intended for use in URLs as it ' s not * escaped . < / p > * < p > Filter parameters are sorted by key so that the g...
if ( this . parameters == null ) { return String . format ( "filter=%s" , this . name ) ; } else { List < String > queries = new ArrayList < String > ( ) ; for ( Map . Entry < String , String > parameter : this . parameters . entrySet ( ) ) { queries . add ( String . format ( "%s=%s" , parameter . getKey ( ) , paramete...
public class OptionsDoclet { /** * Get the result of inserting the options documentation into the docfile . * @ return the docfile , but with the command - line argument documentation updated * @ throws Exception if there is trouble reading files */ @ RequiresNonNull ( "docFile" ) private String newDocFileText ( ) ...
StringJoiner b = new StringJoiner ( lineSep ) ; BufferedReader doc = Files . newBufferedReader ( docFile . toPath ( ) , UTF_8 ) ; String docline ; boolean replacing = false ; boolean replacedOnce = false ; String prefix = null ; while ( ( docline = doc . readLine ( ) ) != null ) { if ( replacing ) { if ( docline . trim...
public class GroupService { /** * Power on groups of servers * @ param groups groups references list * @ return OperationFuture wrapper for Server list */ public OperationFuture < List < Server > > powerOn ( Group ... groups ) { } }
return serverService ( ) . powerOn ( getServerSearchCriteria ( groups ) ) ;
public class ServiceInstanceQueryHelper { /** * Filter the ModelServiceInstance list against the ServiceInstanceQuery . * @ param query * the ServiceInstanceQuery matchers . * @ param list * the ModelServiceInstance list . * @ return * the matched ModelServiceInstance list . */ public static List < ModelSer...
List < ModelServiceInstance > instances = new ArrayList < ModelServiceInstance > ( ) ; for ( ModelServiceInstance instance : list ) { boolean passed = true ; for ( QueryCriterion criterion : query . getCriteria ( ) ) { if ( criterion . isMatch ( instance . getMetadata ( ) ) == false ) { passed = false ; break ; } } if ...
public class RegistriesInner { /** * Get the upload location for the user to be able to upload the source . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ throws IllegalArgumentException thrown if...
return getBuildSourceUploadUrlWithServiceResponseAsync ( resourceGroupName , registryName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class MtasFetchData { /** * Gets the url . * @ param prefix the prefix * @ param postfix the postfix * @ return the url * @ throws MtasParserException the mtas parser exception */ public Reader getUrl ( String prefix , String postfix ) throws MtasParserException { } }
String url = getString ( ) ; if ( ( url != null ) && ! url . equals ( "" ) ) { if ( prefix != null ) { url = prefix + url ; } if ( postfix != null ) { url = url + postfix ; } if ( url . startsWith ( "http://" ) || url . startsWith ( "https://" ) ) { BufferedReader in = null ; try { URLConnection connection = new URL ( ...
public class A_CmsEditUserGroupRoleDialog { /** * Init method . < p > */ protected void init ( ) { } }
setHeightUndefined ( ) ; removeExistingTable ( getLeftTableLayout ( ) ) ; removeExistingTable ( getRightTableLayout ( ) ) ; final CmsAvailableRoleOrPrincipalTable table = new CmsAvailableRoleOrPrincipalTable ( this ) ; if ( getAvailableItemsIndexedContainer ( "caption" , "icon" ) . size ( ) > 0 ) { getRightTableLayout ...
public class PolicyStatesInner { /** * Summarizes policy states for the resource group level policy assignment . * @ param subscriptionId Microsoft Azure subscription ID . * @ param resourceGroupName Resource group name . * @ param policyAssignmentName Policy assignment name . * @ throws IllegalArgumentExceptio...
return summarizeForResourceGroupLevelPolicyAssignmentWithServiceResponseAsync ( subscriptionId , resourceGroupName , policyAssignmentName ) . map ( new Func1 < ServiceResponse < SummarizeResultsInner > , SummarizeResultsInner > ( ) { @ Override public SummarizeResultsInner call ( ServiceResponse < SummarizeResultsInner...
public class PartitionBuilder { /** * Return the intersect of two disjoint partition . The returned disjoint partition has items that : - Each interval * item is a subset of only an interval I1 \ in p1 and a subset of only an interval I2 \ in p2. * @ param p1 * @ param p2 * @ return */ public static < T extends...
if ( p1 . size ( ) == 0 || p2 . size ( ) == 0 ) { return new Partition < T > ( ) ; } List < Interval < T > > tempIntervals = combine ( p1 , p2 ) ; Interval < T > newInterval = null ; Interval < T > superOfNewIntervalP1 = null ; Interval < T > superOfNewIntervalP2 = null ; // combine adjacent intervals which belong to t...
public class ListAppsResult { /** * A list of application summaries . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setApps ( java . util . Collection ) } or { @ link # withApps ( java . util . Collection ) } if you want to override the * existing values ...
if ( this . apps == null ) { setApps ( new java . util . ArrayList < AppSummary > ( apps . length ) ) ; } for ( AppSummary ele : apps ) { this . apps . add ( ele ) ; } return this ;
public class AmazonCognitoIdentityClient { /** * Gets details about a particular identity pool , including the pool name , ID description , creation date , and * current number of users . * You must use AWS Developer credentials to call this API . * @ param describeIdentityPoolRequest * Input to the DescribeIde...
request = beforeClientExecution ( request ) ; return executeDescribeIdentityPool ( request ) ;
public class InstanceFailoverGroupsInner { /** * Fails over from the current primary managed instance to this managed instance . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param locationNam...
return ServiceFuture . fromResponse ( failoverWithServiceResponseAsync ( resourceGroupName , locationName , failoverGroupName ) , serviceCallback ) ;
public class IIntQueue { /** * append a int from the tail * @ param data * @ return boolean */ public boolean enQueue ( int data ) { } }
Entry o = new Entry ( data , tail . prev , tail ) ; tail . prev . next = o ; tail . prev = o ; // set the size size ++ ; return true ;
public class Tags { /** * Return a new { @ code Tags } instance by merging this collection and the specified key / value pair . * @ param key the tag key to add * @ param value the tag value to add * @ return a new { @ code Tags } instance */ public Tags and ( String key , String value ) { } }
return and ( Tag . of ( key , value ) ) ;
public class SoapClientActionBuilder { /** * Generic response builder for expecting response messages on client . * @ return */ public SoapClientResponseActionBuilder receive ( ) { } }
SoapClientResponseActionBuilder soapClientResponseActionBuilder ; if ( soapClient != null ) { soapClientResponseActionBuilder = new SoapClientResponseActionBuilder ( action , soapClient ) ; } else { soapClientResponseActionBuilder = new SoapClientResponseActionBuilder ( action , soapClientUri ) ; } soapClientResponseAc...
public class CmsSingleTreeLocaleHandler { /** * Reads the locale from the first path element . < p > * @ param sitePath the site path with the locale prefix * @ return the locale or < code > null < / code > if no matching locale was found */ public static Locale getLocaleFromPath ( String sitePath ) { } }
Locale result = null ; if ( sitePath . indexOf ( "/" ) == 0 ) { sitePath = sitePath . substring ( 1 ) ; } if ( sitePath . length ( ) > 1 ) { String localePrefix ; if ( ! sitePath . contains ( "/" ) ) { // this may be the case for paths pointing to the root folder of a site // check for parameters int separator = - 1 ; ...
public class Element { /** * ( non - Javadoc ) * @ see * qc . automation . framework . widget . IElement # waitForAttributeNotEqualTo ( java * . lang . String , java . lang . String , java . lang . Long ) */ public void waitForAttributeNotEqualTo ( final String attributeName , final String attributeValue , long t...
waitForCommand ( new ITimerCallback ( ) { @ Override public boolean execute ( ) throws WidgetException { String val = getAttribute ( attributeName ) ; if ( val == null && attributeName == null ) return true ; if ( val == null || attributeName == null ) return false ; if ( ! val . equals ( attributeValue ) ) return true...
public class StandardAtomGenerator { /** * Position the hydrogen label relative to the element label . * @ param position relative position where the hydrogen is placed * @ param element the outline of the element label * @ param hydrogen the outline of the hydrogen * @ return positioned hydrogen label */ TextO...
final Rectangle2D elementBounds = element . getBounds ( ) ; final Rectangle2D hydrogenBounds = hydrogen . getBounds ( ) ; switch ( position ) { case Above : return hydrogen . translate ( 0 , ( elementBounds . getMinY ( ) - padding ) - hydrogenBounds . getMaxY ( ) ) ; case Right : return hydrogen . translate ( ( element...
public class HodViewServiceImpl { /** * Format the document ' s content for display in a browser */ private InputStream formatRawContent ( final Document document ) throws IOException { } }
final String body = "<h1>" + escapeAndAddLineBreaks ( resolveTitle ( document ) ) + "</h1>" + "<p>" + escapeAndAddLineBreaks ( document . getContent ( ) ) + "</p>" ; return IOUtils . toInputStream ( body , StandardCharsets . UTF_8 ) ;
public class Logger { /** * Logs a message and stack trace if DEBUG logging is enabled * or a formatted message and exception description if INFO logging is enabled . * @ param cause an exception to print stack trace of if DEBUG logging is enabled * @ param message a message */ public final void infoDebug ( final...
logDebug ( Level . INFO , cause , message ) ;
public class Dialog { /** * Set the text of positive action button . * @ param action * @ return The Dialog for chaining methods . */ public Dialog positiveAction ( CharSequence action ) { } }
mPositiveAction . setText ( action ) ; mPositiveAction . setVisibility ( TextUtils . isEmpty ( action ) ? View . GONE : View . VISIBLE ) ; return this ;
public class druidGParser { /** * druidG . g : 377:1 : complexHaving returns [ Having having ] : ( ( s = simpleHaving ) | ( a = simpleHaving WS o = ( AND | OR ) WS b = complexHaving ) ) ; */ public final Having complexHaving ( ) throws RecognitionException { } }
Having having = null ; Token o = null ; Having s = null ; Having a = null ; Having b = null ; try { // druidG . g : 378:2 : ( ( s = simpleHaving ) | ( a = simpleHaving WS o = ( AND | OR ) WS b = complexHaving ) ) int alt182 = 2 ; alt182 = dfa182 . predict ( input ) ; switch ( alt182 ) { case 1 : // druidG . g : 378:4 :...
public class VpnGatewaysInner { /** * Lists all the VpnGateways in a subscription . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; VpnGatewayInn...
return listNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < VpnGatewayInner > > , Page < VpnGatewayInner > > ( ) { @ Override public Page < VpnGatewayInner > call ( ServiceResponse < Page < VpnGatewayInner > > response ) { return response . body ( ) ; } } ) ;
public class RecoveryHelper { /** * Moves a copied path into a persistent location managed by gobblin - distcp . This method is used when an already * copied file cannot be successfully published . In future runs , instead of re - copying the file , distcp will use the * persisted file . * @ param state { @ link ...
if ( ! this . persistDir . isPresent ( ) ) { return false ; } String guid = computeGuid ( state , file ) ; Path guidPath = new Path ( this . persistDir . get ( ) , guid ) ; if ( ! this . fs . exists ( guidPath ) ) { this . fs . mkdirs ( guidPath , new FsPermission ( FsAction . ALL , FsAction . READ , FsAction . NONE ) ...
public class Domain { /** * Convenience method to return a Domain * @ param client the client . * @ param id the domain id . * @ return the domain object . * @ throws ParseException Error parsing data * @ throws Exception error */ public static Domain get ( final BandwidthClient client , final String id ) thr...
assert ( client != null ) ; final String domainsUri = client . getUserResourceInstanceUri ( BandwidthConstants . DOMAINS_URI_PATH , id ) ; final JSONObject jsonObject = toJSONObject ( client . get ( domainsUri , null ) ) ; return new Domain ( client , jsonObject ) ;
public class GetIntentResult { /** * An array of sample utterances configured for the intent . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setSampleUtterances ( java . util . Collection ) } or { @ link # withSampleUtterances ( java . util . Collection ) }...
if ( this . sampleUtterances == null ) { setSampleUtterances ( new java . util . ArrayList < String > ( sampleUtterances . length ) ) ; } for ( String ele : sampleUtterances ) { this . sampleUtterances . add ( ele ) ; } return this ;
public class AnnotationInfo { /** * Populates an @ RiakUsermeta annotated domain object with the User metadata . * @ param < T > * @ param userMetadata * @ param obj */ public < T > void setUsermetaData ( RiakUserMetadata userMetadata , T obj ) { } }
Field mapField = null ; for ( UsermetaField uf : usermetaFields ) { switch ( uf . getFieldType ( ) ) { case STRING : if ( userMetadata . containsKey ( uf . getUsermetaDataKey ( ) ) ) { setFieldValue ( uf . getField ( ) , obj , userMetadata . get ( uf . getUsermetaDataKey ( ) ) ) ; userMetadata . remove ( uf . getUserme...
public class Util { /** * Formats the given exception in a multiline error message with all causes . * @ param e * Exception for format as error message * @ return Returns an error string */ public static String formatException ( final Exception e ) { } }
final StringBuilder sb = new StringBuilder ( ) ; Throwable t = e ; while ( t != null ) { sb . append ( t . getMessage ( ) ) . append ( "\n" ) ; t = t . getCause ( ) ; } return sb . toString ( ) ;
public class BaseActions { /** * < p > Returns the input text matched by the rule immediately preceding the action expression that is currently * being evaluated . If the matched input text is empty the given default string is returned . * This call can only be used in actions that are part of a Sequence rule and a...
check ( ) ; String match = context . getMatch ( ) ; return match . length ( ) == 0 ? defaultString : match ;
public class Section { /** * getter for textObjects - gets the text objects ( figure , table , boxed text etc . ) that are associated with a particular section * @ generated * @ return value of the feature */ public FSArray getTextObjects ( ) { } }
if ( Section_Type . featOkTst && ( ( Section_Type ) jcasType ) . casFeat_textObjects == null ) jcasType . jcas . throwFeatMissing ( "textObjects" , "de.julielab.jules.types.Section" ) ; return ( FSArray ) ( jcasType . ll_cas . ll_getFSForRef ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Section_Type ) jcasType ) . ...
public class BidiLine { /** * Compute the runs array from the levels array . * After getRuns ( ) returns true , runCount is guaranteed to be > 0 * and the runs are reordered . * Odd - level runs have visualStart on their visual right edge and * they progress visually to the left . * If option OPTION _ INSERT ...
/* * This method returns immediately if the runs are already set . This * includes the case of length = = 0 ( handled in setPara ) . . */ if ( bidi . runCount >= 0 ) { return ; } if ( bidi . direction != Bidi . MIXED ) { /* simple , single - run case - this covers length = = 0 */ /* bidi . paraLevel is ok even for co...