signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ElasticSearchDruidDataSource { /** * 抛弃连接 , 不进行回收 , 而是抛弃 * @ param realConnection * @ throws SQLException */ public void discardConnection ( Connection realConnection ) { } }
JdbcUtils . close ( realConnection ) ; lock . lock ( ) ; try { activeCount -- ; discardCount ++ ; if ( activeCount <= 0 ) { emptySignal ( ) ; } } finally { lock . unlock ( ) ; }
public class Util { /** * Check whether there are any element nodes in a { @ link NodeList } */ static final boolean textNodesOnly ( NodeList list ) { } }
final int length = list . getLength ( ) ; for ( int i = 0 ; i < length ; i ++ ) if ( list . item ( i ) . getNodeType ( ) != Node . TEXT_NODE ) return false ; return true ;
public class SparkComputationGraph { /** * DataSet version of { @ link # scoreExamples ( JavaPairRDD , boolean , int ) } */ public < K > JavaPairRDD < K , Double > scoreExamples ( JavaPairRDD < K , DataSet > data , boolean includeRegularizationTerms , int batchSize ) { } }
return scoreExamplesMultiDataSet ( data . mapToPair ( new PairDataSetToMultiDataSetFn < K > ( ) ) , includeRegularizationTerms , batchSize ) ;
public class SNISSLExplorer { /** * struct { * NameType name _ type ; * select ( name _ type ) { * case host _ name : HostName ; * } name ; * } ServerName ; * enum { * host _ name ( 0 ) , ( 255) * } NameType ; * opaque HostName < 1 . . 2 ^ 16-1 > ; * struct { * ServerName server _ name _ list < 1 ...
Map < Integer , SNIServerName > sniMap = new LinkedHashMap < > ( ) ; int remains = extLen ; if ( extLen >= 2 ) { // " server _ name " extension in ClientHello int listLen = getInt16 ( input ) ; // length of server _ name _ list if ( listLen == 0 || listLen + 2 != extLen ) { throw UndertowMessages . MESSAGES . invalidTl...
public class NetworkProfilesInner { /** * Gets all network profiles in a resource group . * @ 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 ; Network...
return listByResourceGroupNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < NetworkProfileInner > > , Page < NetworkProfileInner > > ( ) { @ Override public Page < NetworkProfileInner > call ( ServiceResponse < Page < NetworkProfileInner > > response ) { return response . body (...
public class Customization { /** * Return true if actual value matches expected value using this * Customization ' s comparator . The equal method used for comparison depends * on type of comparator . * @ param prefix * JSON path of the JSON item being tested ( only used if * comparator is a LocationAwareValu...
if ( comparator instanceof LocationAwareValueMatcher ) { return ( ( LocationAwareValueMatcher < Object > ) comparator ) . equal ( prefix , actual , expected , result ) ; } return comparator . equal ( actual , expected ) ;
public class AdHoc_RW_SP { /** * System procedure run hook . * Use the base class implementation . * @ param ctx execution context * @ param partitionParam serialized partition parameter * @ param partitionParamType type of the partition parameter used to deserialize it * @ param serializedBatchData serialize...
return runAdHoc ( ctx , serializedBatchData ) ;
public class Help { /** * < pre > * URL ( s ) pointing to additional information on handling the current error . * < / pre > * < code > repeated . google . rpc . Help . Link links = 1 ; < / code > */ public java . util . List < com . google . rpc . Help . Link > getLinksList ( ) { } }
return links_ ;
public class ShardingDataSourceNames { /** * Get raw master data source name . * @ param dataSourceName data source name * @ return raw master data source name */ public String getRawMasterDataSourceName ( final String dataSourceName ) { } }
for ( MasterSlaveRuleConfiguration each : shardingRuleConfig . getMasterSlaveRuleConfigs ( ) ) { if ( each . getName ( ) . equals ( dataSourceName ) ) { return each . getMasterDataSourceName ( ) ; } } return dataSourceName ;
public class AppServiceCertificateOrdersInner { /** * Verify domain ownership for this certificate order . * Verify domain ownership for this certificate order . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param certificateOrderName Name of the certificate order . ...
return retrieveSiteSealWithServiceResponseAsync ( resourceGroupName , certificateOrderName , siteSealRequest ) . toBlocking ( ) . single ( ) . body ( ) ;
public class HelpTopicNode { /** * Inserts a child node at the specified position . * @ param node Child node to insert . * @ param index Insertion position ( - 1 to append ) . */ public void addChild ( HelpTopicNode node , int index ) { } }
node . detach ( ) ; node . parent = this ; if ( index < 0 ) { children . add ( node ) ; } else { children . add ( index , node ) ; }
public class ElementSelectors { /** * Accepts two elements if exactly on of the given ElementSelectors does . */ public static ElementSelector xor ( final ElementSelector es1 , final ElementSelector es2 ) { } }
if ( es1 == null || es2 == null ) { throw new IllegalArgumentException ( SELECTORS_MUST_NOT_BE_NULL ) ; } return new ElementSelector ( ) { @ Override public boolean canBeCompared ( Element controlElement , Element testElement ) { return es1 . canBeCompared ( controlElement , testElement ) ^ es2 . canBeCompared ( contro...
public class TaskClient { /** * Retrieve information about the task * @ param taskId ID of the task * @ return Task details */ public Task getTaskDetails ( String taskId ) { } }
Preconditions . checkArgument ( StringUtils . isNotBlank ( taskId ) , "Task id cannot be blank" ) ; return protoMapper . fromProto ( stub . getTask ( TaskServicePb . GetTaskRequest . newBuilder ( ) . setTaskId ( taskId ) . build ( ) ) . getTask ( ) ) ;
public class UpdateThingGroupsForThingRequest { /** * The groups to which the thing will be added . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setThingGroupsToAdd ( java . util . Collection ) } or { @ link # withThingGroupsToAdd ( java . util . Collectio...
if ( this . thingGroupsToAdd == null ) { setThingGroupsToAdd ( new java . util . ArrayList < String > ( thingGroupsToAdd . length ) ) ; } for ( String ele : thingGroupsToAdd ) { this . thingGroupsToAdd . add ( ele ) ; } return this ;
public class BobblePath { /** * documentation inherited from interface Path */ public boolean tick ( Pathable pable , long tickStamp ) { } }
// see if we need to stop if ( _stopTime <= tickStamp ) { boolean updated = updatePositionTo ( pable , _sx , _sy ) ; pable . pathCompleted ( tickStamp ) ; return updated ; } // see if it ' s time to move . . if ( _nextMove > tickStamp ) { return false ; } // when bobbling , it ' s bad form to bobble into the same posit...
public class NodeManager { /** * return true if a new node has been added - else return false * @ param clusterNodeInfo the node that is heartbeating * @ return true if this is a new node that has been added , false otherwise */ public boolean heartbeat ( ClusterNodeInfo clusterNodeInfo ) throws DisallowedNode { } ...
ClusterNode node = nameToNode . get ( clusterNodeInfo . name ) ; if ( ! canAllowNode ( clusterNodeInfo . getAddress ( ) . getHost ( ) ) ) { if ( node != null ) { node . heartbeat ( clusterNodeInfo ) ; } else { throw new DisallowedNode ( clusterNodeInfo . getAddress ( ) . getHost ( ) ) ; } return false ; } boolean newNo...
public class TileGenerator { /** * Update the Content and Tile Matrix Set bounds * @ param tileMatrixSet * @ throws java . sql . SQLException */ private void updateTileBounds ( TileMatrixSet tileMatrixSet ) throws SQLException { } }
TileDao tileDao = geoPackage . getTileDao ( tileMatrixSet ) ; if ( tileDao . isGoogleTiles ( ) ) { if ( ! googleTiles ) { // If adding GeoPackage tiles to a Google Tile format , add them // as Google tiles googleTiles = true ; adjustGoogleBounds ( ) ; } } else if ( googleTiles ) { // Can ' t add Google formatted tiles ...
public class UnionSet { /** * Triggers combining . */ @ Override public < T > T [ ] toArray ( T [ ] a ) { } }
combine ( ) ; if ( combined == null ) { Set < E > emptySet = java . util . Collections . emptySet ( ) ; return emptySet . toArray ( a ) ; } return combined . toArray ( a ) ;
public class StructureImpl { /** * { @ inheritDoc } */ @ Override public Chain findChain ( String chainName , int modelnr ) throws StructureException { } }
return getChainByPDB ( chainName , modelnr ) ;
public class Indices { /** * Calculate min and max message timestamps in the given index . * @ param index Name of the index to query . * @ return the timestamp stats in the given index , or { @ code null } if they couldn ' t be calculated . * @ see org . elasticsearch . search . aggregations . metrics . stats . ...
final FilterAggregationBuilder builder = AggregationBuilders . filter ( "agg" , QueryBuilders . existsQuery ( Message . FIELD_TIMESTAMP ) ) . subAggregation ( AggregationBuilders . min ( "ts_min" ) . field ( Message . FIELD_TIMESTAMP ) ) . subAggregation ( AggregationBuilders . max ( "ts_max" ) . field ( Message . FIEL...
public class SearchSort { /** * Sort by geo location . * @ param locationLon longitude of the location . * @ param locationLat latitude of the location . * @ param field the field name . */ public static SearchSortGeoDistance sortGeoDistance ( double locationLon , double locationLat , String field ) { } }
return new SearchSortGeoDistance ( locationLon , locationLat , field ) ;
public class Interceptors { /** * Creates a binary interceptor chain . * @ param < T1 > the function first parameter type * @ param < T2 > the function second parameter type * @ param < I > the binary interceptor type * @ param < R > the function result type * @ param innermost the function to be intercepted ...
dbc . precondition ( interceptors != null , "cannot create an interceptor chain with a null iterable of interceptors" ) ; return new BinaryInterceptorChain < > ( innermost , interceptors . iterator ( ) ) ;
public class Proxies { /** * Create http proxy */ public static Proxy httpProxy ( String host , int port ) { } }
return new Proxy ( Proxy . Type . HTTP , new InetSocketAddress ( Objects . requireNonNull ( host ) , port ) ) ;
public class Assistant { /** * Create dialog node . * Create a new dialog node . * This operation is limited to 500 requests per 30 minutes . For more information , see * * Rate limiting * * . * @ param createDialogNodeOptions the { @ link CreateDialogNodeOptions } containing the options for the call * @ return...
Validator . notNull ( createDialogNodeOptions , "createDialogNodeOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "dialog_nodes" } ; String [ ] pathParameters = { createDialogNodeOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( g...
public class Assert { /** * Assert that an array has elements ; that is , it must not be * { @ code null } and must have at least one element . * < pre class = " code " > Assert . notEmpty ( array , " The array must have elements " ) ; < / pre > * @ param array the array to check * @ param message the exception...
if ( ArrayUtils . isEmpty ( array ) ) { throw new IllegalArgumentException ( message ) ; }
public class StrTokenizer { /** * Creates a new instance of this Tokenizer . The new instance is reset so that * it will be at the start of the token list . * @ return a new instance of this Tokenizer which has been reset . * @ throws CloneNotSupportedException if there is a problem cloning */ Object cloneReset (...
// this method exists to enable 100 % test coverage final StrTokenizer cloned = new StrTokenizer ( ) ; if ( this . chars != null ) { cloned . chars = new char [ this . chars . length ] ; for ( int i = 0 ; i < this . chars . length ; i ++ ) { cloned . chars [ i ] = this . chars [ i ] ; } } if ( this . tokens == null ) {...
public class VertxServerWebSocket { /** * { @ link org . vertx . java . core . http . ServerWebSocket } is available . */ @ Override public < T > T unwrap ( Class < T > clazz ) { } }
return org . vertx . java . core . http . ServerWebSocket . class . isAssignableFrom ( clazz ) ? clazz . cast ( socket ) : null ;
public class GamePlayerBenchmark { private static void gameplay ( Random r , GraphicalModel model , ConcatVector weights , ConcatVector [ ] humanFeatureVectors ) { } }
List < Integer > variablesList = new ArrayList < > ( ) ; List < Integer > variableSizesList = new ArrayList < > ( ) ; for ( GraphicalModel . Factor f : model . factors ) { for ( int i = 0 ; i < f . neigborIndices . length ; i ++ ) { int j = f . neigborIndices [ i ] ; if ( ! variablesList . contains ( j ) ) { variablesL...
public class MoveDataBetweenMarklogicDBs { /** * Main function which exports the data from one database to another . */ public void moveDataBetweenMarklogicDBs ( ) { } }
// Empty and query to retrieve the entire set of documents . This can be // replaced with any cts query narrowing the scope of documents to be // exported . String rawSearch = new StringBuilder ( ) . append ( "<search:search " ) . append ( "xmlns:search='http://marklogic.com/appservices/search' xmlns:cts='http://marklo...
public class BatchSuspendUserResult { /** * If the < a > BatchSuspendUser < / a > action fails for one or more of the user IDs in the request , a list of the user * IDs is returned , along with error codes and error messages . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . U...
if ( this . userErrors == null ) { setUserErrors ( new java . util . ArrayList < UserError > ( userErrors . length ) ) ; } for ( UserError ele : userErrors ) { this . userErrors . add ( ele ) ; } return this ;
public class ProgressInformationPanel { /** * Prints stacktraces to the string writer , and investigates the throwable * hierarchy to check if there ' s any { @ link SQLException } s which also has * " next " exceptions . * @ param printWriter * @ param throwable */ protected void printStackTrace ( final PrintW...
throwable . printStackTrace ( printWriter ) ; Throwable cause = throwable . getCause ( ) ; while ( cause != null ) { if ( cause instanceof SQLException ) { final SQLException nextException = ( ( SQLException ) cause ) . getNextException ( ) ; if ( nextException != null ) { printWriter . print ( "Next exception: " ) ; p...
public class KeyPairWriter { /** * Write the key pair into the output files . * @ param pair the key pair to write . * @ param format that can be { @ link IOFormat # BINARY } or { @ link IOFormat # BASE64 } . Using { @ link IOFormat # STRING } * will throw exception as keys , as opposed to licenses , cannot be sa...
switch ( format ) { case BINARY : osPrivate . write ( pair . getPrivate ( ) ) ; osPublic . write ( pair . getPublic ( ) ) ; return ; case BASE64 : osPrivate . write ( Base64 . getEncoder ( ) . encode ( pair . getPrivate ( ) ) ) ; osPublic . write ( Base64 . getEncoder ( ) . encode ( pair . getPublic ( ) ) ) ; return ; ...
public class FbBotMillNetworkController { /** * POSTs a message as a JSON string to Facebook . * @ param recipient * the recipient * @ param type * the type * @ param file * the file */ public static void postFormDataMessage ( String recipient , AttachmentType type , File file ) { } }
String pageToken = FbBotMillContext . getInstance ( ) . getPageToken ( ) ; // If the page token is invalid , returns . if ( ! validatePageToken ( pageToken ) ) { return ; } // TODO : add checks for valid attachmentTypes ( FILE , AUDIO or VIDEO ) HttpPost post = new HttpPost ( FbBotMillNetworkConstants . FACEBOOK_BASE_U...
public class LeverageBrowserCacheFilter { /** * Execute the filter by appending the < b > Expires < / b > and * < b > Cache - Control < / b > response headers . * @ param servletRequest * the incoming { @ link ServletRequest } instance * @ param servletResponse * the outgoing { @ link ServletResponse } instan...
HttpServletRequest request = ( HttpServletRequest ) servletRequest ; String uri = request . getRequestURI ( ) ; // check if this is a servletRequest to a static resource , like images / css / js // if yes , add the servletResponse header boolean staticResource = isStaticResource ( uri ) ; filterChain . doFilter ( servl...
public class JSModuleGraph { /** * Returns the deepest common dependency of the given modules . */ public JSModule getDeepestCommonDependencyInclusive ( Collection < JSModule > modules ) { } }
Iterator < JSModule > iter = modules . iterator ( ) ; JSModule dep = iter . next ( ) ; while ( iter . hasNext ( ) ) { dep = getDeepestCommonDependencyInclusive ( dep , iter . next ( ) ) ; } return dep ;
public class InternalFeaturePropertyAccessor { /** * { @ inheritDoc } */ public TypedValue read ( EvaluationContext context , Object target , String name ) throws AccessException { } }
if ( target == null ) { throw new AccessException ( "Cannot read property of null target" ) ; } if ( target instanceof InternalFeature ) { InternalFeature feature = ( InternalFeature ) target ; if ( feature . getAttributes ( ) . containsKey ( name ) ) { Attribute < ? > attribute = feature . getAttributes ( ) . get ( na...
public class NameSpace { /** * This method simply delegates to This . invokeMethod ( ) ; . * @ param methodName the method name * @ param args the args * @ param interpreter the interpreter * @ param callstack the callstack * @ param callerInfo the caller info * @ return the object * @ throws EvalError th...
return this . getThis ( interpreter ) . invokeMethod ( methodName , args , interpreter , callstack , callerInfo , false /* declaredOnly */ ) ;
public class Utils { /** * Logs target object error */ static void logE ( Object targetObj , String msg ) { } }
Log . e ( TAG , toLogStr ( targetObj , msg ) ) ;
public class ConsoleAnnotator { /** * Cast operation that restricts T . */ @ SuppressWarnings ( "unchecked" ) public static < T > ConsoleAnnotator < T > cast ( ConsoleAnnotator < ? super T > a ) { } }
return ( ConsoleAnnotator ) a ;
public class AnnotationUtility { /** * Estract from an annotation of a property the attribute value specified . * @ param property property to analyze * @ param annotationClass annotation to analyze * @ param attribute the attribute * @ return attribute value as list of string */ public static String extractAsE...
final Elements elementUtils = BaseProcessor . elementUtils ; final One < String > result = new One < String > ( ) ; extractAttributeValue ( elementUtils , property . getElement ( ) , annotationClass . getName ( ) , attribute , new OnAttributeFoundListener ( ) { @ Override public void onFound ( String value ) { result ....
public class PolicyInformation { /** * PolicyInformation : : = SEQUENCE { * policyIdentifier CertPolicyId , * policyQualifiers SEQUENCE SIZE ( 1 . . MAX ) OF * PolicyQualifierInfo OPTIONAL } */ public DERObject toASN1Object ( ) { } }
ASN1EncodableVector v = new ASN1EncodableVector ( ) ; v . add ( policyIdentifier ) ; if ( policyQualifiers != null ) { v . add ( policyQualifiers ) ; } return new DERSequence ( v ) ;
public class JPEGQuality { /** * Determines an approximate JPEG compression quality value from the quantization tables . * The value will be in the range { @ code [ 0 . . . 1 ] } , where { @ code 1 } is the best possible value . * @ param input an image input stream containing JPEG data . * @ return a float in th...
return getJPEGQuality ( JPEGSegmentUtil . readSegments ( input , JPEG . DQT , null ) ) ;
public class JavacHandlerUtil { /** * In javac , dotted access of any kind , from { @ code java . lang . String } to { @ code var . methodName } * is represented by a fold - left of { @ code Select } nodes with the leftmost string represented by * a { @ code Ident } node . This method generates such an expression ....
return chainDots ( node , null , null , elems . split ( "\\." ) ) ;
public class xen_health_resource { /** * < pre > * Converts API response of bulk operation into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
xen_health_resource_responses result = ( xen_health_resource_responses ) service . get_payload_formatter ( ) . string_to_resource ( xen_health_resource_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exceptio...
public class JsonDBTemplate { /** * / * ( non - Javadoc ) * @ see io . jsondb . JsonDBOperations # createCollection ( java . lang . String ) */ @ Override public < T > void createCollection ( String collectionName ) { } }
CollectionMetaData cmd = cmdMap . get ( collectionName ) ; if ( null == cmd ) { throw new InvalidJsonDbApiUsageException ( "No class found with @Document Annotation and attribute collectionName as: " + collectionName ) ; } @ SuppressWarnings ( "unchecked" ) Map < Object , T > collection = ( Map < Object , T > ) collect...
public class DefaultCommandRegistry { /** * { @ inheritDoc } */ public boolean containsCommand ( String commandId ) { } }
Assert . notNull ( commandId , "commandId" ) ; if ( this . commandMap . containsKey ( commandId ) ) { return true ; } if ( this . parent != null ) { return this . parent . containsCommand ( commandId ) ; } return false ;
public class Stream { /** * This aggregator operation computes the minimum of tuples by the given { @ code inputFieldName } and it is * assumed that its value is an instance of { @ code Comparable } . If the value of tuple with field { @ code inputFieldName } is not an * instance of { @ code Comparable } then it th...
Aggregator < ComparisonAggregator . State > min = new Min ( inputFieldName ) ; return comparableAggregateStream ( inputFieldName , min ) ;
public class DirectedGraph { /** * Add a vertex to the graph . Nothing happens if vertex is already in graph . */ public void addVertex ( V vertex ) { } }
if ( containsVertex ( vertex ) ) { return ; } neighbors . put ( vertex , new ArrayList < V > ( ) ) ;
public class PalDB { /** * Creates a store writer with the specified < code > file < / code > as destination . * The parent folder is created if missing . * @ param file location of the output file * @ param config configuration * @ return a store writer */ public static StoreWriter createWriter ( File file , C...
return StoreImpl . createWriter ( file , config ) ;
public class CmsSetupXmlHelper { /** * Unmarshals ( reads ) an XML string into a new document . < p > * @ param xml the XML code to unmarshal * @ return the generated document * @ throws CmsXmlException if something goes wrong */ public static String format ( String xml ) throws CmsXmlException { } }
return CmsXmlUtils . marshal ( ( Node ) CmsXmlUtils . unmarshalHelper ( xml , null ) , CmsEncoder . ENCODING_UTF_8 ) ;
public class LDblToCharFunctionBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static LDblToCharFunction dblToCharFunctionFrom ( Consumer < LDblToCharFunctionBuilder > buildingFunction ) { } }
LDblToCharFunctionBuilder builder = new LDblToCharFunctionBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class JobConf { /** * Find a jar that contains a class of the same name , if any . * It will return a jar file , even if that is not the first thing * on the class path that has a class with the same name . * @ param my _ class the class to find . * @ return a jar file that contains the class , or null ....
ClassLoader loader = my_class . getClassLoader ( ) ; String class_file = my_class . getName ( ) . replaceAll ( "\\." , "/" ) + ".class" ; try { for ( Enumeration itr = loader . getResources ( class_file ) ; itr . hasMoreElements ( ) ; ) { URL url = ( URL ) itr . nextElement ( ) ; if ( "jar" . equals ( url . getProtocol...
public class Builder { /** * Returns a newly created { @ code EVCache } based on the contents of the * { @ code Builder } . */ @ SuppressWarnings ( "deprecation" ) public EVCache build ( ) { } }
if ( _poolManager == null ) { _poolManager = EVCacheClientPoolManager . getInstance ( ) ; if ( logger . isDebugEnabled ( ) ) logger . debug ( "_poolManager - " + _poolManager + " through getInstance" ) ; } if ( _appName == null ) { throw new IllegalArgumentException ( "param appName cannot be null." ) ; } customize ( )...
public class ObjectReferenceDescriptor { /** * add a foreign key field ID */ public void addForeignKeyField ( int newId ) { } }
if ( m_ForeignKeyFields == null ) { m_ForeignKeyFields = new Vector ( ) ; } m_ForeignKeyFields . add ( new Integer ( newId ) ) ;
public class BatchReadResult { /** * A list of all the responses for each batch read . * @ param responses * A list of all the responses for each batch read . */ public void setResponses ( java . util . Collection < BatchReadOperationResponse > responses ) { } }
if ( responses == null ) { this . responses = null ; return ; } this . responses = new java . util . ArrayList < BatchReadOperationResponse > ( responses ) ;
public class DeleteBGPPeerRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteBGPPeerRequest deleteBGPPeerRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteBGPPeerRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteBGPPeerRequest . getVirtualInterfaceId ( ) , VIRTUALINTERFACEID_BINDING ) ; protocolMarshaller . marshall ( deleteBGPPeerRequest . getAsn ( ) , ASN_BINDING ) ...
public class Element { /** * Returns the element symbol of this element . * @ return The element symbol of this element . Null if unset . * @ see # setSymbol */ @ Override public String getSymbol ( ) { } }
if ( atomicNumber == null ) return null ; if ( atomicNumber == 0 ) return "R" ; return Elements . ofNumber ( atomicNumber ) . symbol ( ) ;
public class route { /** * Use this API to update route . */ public static base_response update ( nitro_service client , route resource ) throws Exception { } }
route updateresource = new route ( ) ; updateresource . network = resource . network ; updateresource . netmask = resource . netmask ; updateresource . gateway = resource . gateway ; updateresource . td = resource . td ; updateresource . distance = resource . distance ; updateresource . cost1 = resource . cost1 ; updat...
public class UndecidedNode { /** * Size of this subtree ; sets _ nodeType also */ @ Override public final int size ( ) { } }
if ( _size != 0 ) return _size ; // Cached size assert _nodeType == 0 : "unexpected node type: " + _nodeType ; if ( _split . _equal != 0 ) _nodeType |= _split . _equal == 1 ? 4 : ( _split . _equal == 2 ? 8 : 12 ) ; // int res = 7 ; / / 1B node type + flags , 2B colId , 4B float split val // 1B node type + flags , 2B co...
public class MutableBigInteger { /** * Multiply the contents of two MutableBigInteger objects . The result is * placed into MutableBigInteger z . The contents of y are not changed . */ void multiply ( MutableBigInteger y , MutableBigInteger z ) { } }
int xLen = intLen ; int yLen = y . intLen ; int newLen = xLen + yLen ; // Put z into an appropriate state to receive product if ( z . value . length < newLen ) z . value = new int [ newLen ] ; z . offset = 0 ; z . intLen = newLen ; // The first iteration is hoisted out of the loop to avoid extra add long carry = 0 ; fo...
public class WhiteboardDtoService { /** * Maps a default context ( whithout whiteboard - service ) to a ServletContextDTO */ private ServletContextDTO mapServletContext ( Map . Entry < ServiceReference < ServletContext > , ServletContext > mapEntry ) { } }
final ServiceReference < ServletContext > ref = mapEntry . getKey ( ) ; final ServletContext servletContext = mapEntry . getValue ( ) ; ServletContextDTO dto = new ServletContextDTO ( ) ; dto . serviceId = ( long ) ref . getProperty ( Constants . SERVICE_ID ) ; // the actual ServletContext might use " " instead of " / ...
public class FactoryFeatureExtractor { /** * Standard non - max feature extractor . * @ param config Configuration for extractor * @ return A feature extractor . */ public static NonMaxSuppression nonmax ( @ Nullable ConfigExtract config ) { } }
if ( config == null ) config = new ConfigExtract ( ) ; config . checkValidity ( ) ; if ( BOverrideFactoryFeatureExtractor . nonmax != null ) { return BOverrideFactoryFeatureExtractor . nonmax . process ( config ) ; } NonMaxBlock . Search search ; if ( config . useStrictRule ) { if ( config . detectMaximums ) if ( confi...
public class FunctionAnnotation { public static SingleInputSemanticProperties readSingleConstantAnnotations ( UserCodeWrapper < ? > udf ) { } }
// get constantSet annotation from stub AllFieldsConstants allConstants = udf . getUserCodeAnnotation ( AllFieldsConstants . class ) ; ConstantFields constantSet = udf . getUserCodeAnnotation ( ConstantFields . class ) ; ConstantFieldsExcept notConstantSet = udf . getUserCodeAnnotation ( ConstantFieldsExcept . class ) ...
public class FNDImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setMaxPtSize ( Integer newMaxPtSize ) { } }
Integer oldMaxPtSize = maxPtSize ; maxPtSize = newMaxPtSize ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . FND__MAX_PT_SIZE , oldMaxPtSize , maxPtSize ) ) ;
public class ProjectCalendar { /** * Utility method to clear cached calendar data . */ private void clearWorkingDateCache ( ) { } }
m_workingDateCache . clear ( ) ; m_startTimeCache . clear ( ) ; m_getDateLastResult = null ; for ( ProjectCalendar calendar : m_derivedCalendars ) { calendar . clearWorkingDateCache ( ) ; }
public class DefaultLogbackConfigurator { /** * { @ inheritDoc } */ @ Override public void addError ( String msg , Throwable ex ) { } }
context . getStatusManager ( ) . add ( new ErrorStatus ( msg , context , ex ) ) ;
public class AppEngineGetList { /** * Qualifies entities to be retrieved with the specified { @ code Filter } s . * Each of the specified filters is combined with " logical and " . * @ param filters { @ code Filter } s to qualify entities to be retrieved . * @ return The { @ code GetList } which the execution res...
if ( filters == null ) { throw new IllegalArgumentException ( "'filters' must not be [" + null + "]" ) ; } this . filters = Arrays . asList ( filters ) ; return this ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcPowerMeasure ( ) { } }
if ( ifcPowerMeasureEClass == null ) { ifcPowerMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 724 ) ; } return ifcPowerMeasureEClass ;
public class ContentsIdExtension { /** * Remove all trace of the extension */ public void removeExtension ( ) { } }
try { if ( contentsIdDao . isTableExists ( ) ) { geoPackage . dropTable ( contentsIdDao . getTableName ( ) ) ; } if ( extensionsDao . isTableExists ( ) ) { extensionsDao . deleteByExtension ( EXTENSION_NAME ) ; } } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to delete Contents Id extension and ta...
public class JavaParser { /** * src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 309:1 : typeParameter : Identifier ( ' extends ' bound ) ? ; */ public final void typeParameter ( ) throws RecognitionException { } }
int typeParameter_StartIndex = input . index ( ) ; try { if ( state . backtracking > 0 && alreadyParsedRule ( input , 9 ) ) { return ; } // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 310:5 : ( Identifier ( ' extends ' bound ) ? ) // src / main / resources / org / drools / ...
public class BufsConsumerGzipInflater { /** * region skip header fields */ private void skipHeaders ( int flag ) { } }
// trying to skip optional gzip file members if any is present if ( ( flag & FEXTRA ) != 0 ) { skipExtra ( flag ) ; } else if ( ( flag & FNAME ) != 0 ) { skipTerminatorByte ( flag , FNAME ) ; } else if ( ( flag & FCOMMENT ) != 0 ) { skipTerminatorByte ( flag , FCOMMENT ) ; } else if ( ( flag & FHCRC ) != 0 ) { skipCRC1...
public class Constraints { /** * Returns a constrained view of the specified collection , using the specified * constraint . Any operations that add new elements to the collection will * call the provided constraint . However , this method does not verify that * existing elements satisfy the constraint . * < p ...
return new ConstrainedCollection < E > ( collection , constraint ) ;
public class DateTimeParseContext { /** * Ends the parsing of an optional segment of the input . * @ param successful whether the optional segment was successfully parsed */ void endOptional ( boolean successful ) { } }
if ( successful ) { parsed . remove ( parsed . size ( ) - 2 ) ; } else { parsed . remove ( parsed . size ( ) - 1 ) ; }
public class ProxyBuilderDefaultImpl { /** * ( non - Javadoc ) * @ see * io . joynr . proxy . ProxyBuilder # setMessagingQos ( io . joynr . messaging . MessagingQos ) */ @ Override public ProxyBuilder < T > setMessagingQos ( final MessagingQos messagingQos ) { } }
if ( messagingQos . getRoundTripTtl_ms ( ) > maxMessagingTtl ) { logger . warn ( "Error in MessageQos. domains: {} interface: {} Max allowed ttl: {}. Passed ttl: {}" , domains , interfaceName , maxMessagingTtl , messagingQos . getRoundTripTtl_ms ( ) ) ; messagingQos . setTtl_ms ( maxMessagingTtl ) ; } this . messagingQ...
public class CmsAccountsToolHandler { /** * Returns the visibility flag module parameter value . < p > * @ return the visibility flag module parameter value */ protected String getVisibilityFlag ( ) { } }
CmsModule module = OpenCms . getModuleManager ( ) . getModule ( this . getClass ( ) . getPackage ( ) . getName ( ) ) ; if ( module == null ) { return VISIBILITY_ALL ; } return module . getParameter ( PARAM_VISIBILITY_FLAG , VISIBILITY_ALL ) ;
public class FeatureWriter { /** * Adds organism , / mol _ type and / db _ ref = " taxon : " feature qualifiers into * the source feature . If these qualifiers already exist they are removed . */ public static Vector < Qualifier > getFeatureQualifiers ( Entry entry , Feature feature ) { } }
Vector < Qualifier > qualifiers = new Vector < Qualifier > ( ) ; if ( feature instanceof SourceFeature ) { String scientificName = ( ( SourceFeature ) feature ) . getScientificName ( ) ; if ( ! FlatFileUtils . isBlankString ( scientificName ) ) { Qualifier qualifier = ( new QualifierFactory ( ) ) . createQualifier ( "o...
public class LinearSolverQrHouseCol_DDRM { /** * Solves for X using the QR decomposition . * @ param B A matrix that is n by m . Not modified . * @ param X An n by m matrix where the solution is written to . Modified . */ @ Override public void solve ( DMatrixRMaj B , DMatrixRMaj X ) { } }
if ( B . numRows != numRows ) throw new IllegalArgumentException ( "Unexpected dimensions for X: X rows = " + X . numRows + " expected = " + numRows ) ; X . reshape ( numCols , B . numCols ) ; int BnumCols = B . numCols ; // solve each column one by one for ( int colB = 0 ; colB < BnumCols ; colB ++ ) { // make a copy ...
public class RandomUtil { /** * Picks a random object from the supplied List . The specified skip object will be skipped when * selecting a random value . The skipped object must exist exactly once in the List . * @ return a randomly selected item . */ public static < T > T pickRandom ( List < T > values , T skip )...
return pickRandom ( values , skip , rand ) ;
public class TangoCacheManager { /** * Remove polling of a command * @ param command * @ throws DevFailed */ public synchronized void removeCommandPolling ( final CommandImpl command ) throws DevFailed { } }
if ( commandCacheMap . containsKey ( command ) ) { final CommandCache cache = commandCacheMap . get ( command ) ; cache . stopRefresh ( ) ; commandCacheMap . remove ( command ) ; } else if ( extTrigCommandCacheMap . containsKey ( command ) ) { extTrigCommandCacheMap . remove ( command ) ; } else if ( command . getName ...
public class Generator { /** * Gets or creates a { @ link LibBinder } object for the given * type library . */ private LibBinder getTypeLibInfo ( IWTypeLib p ) throws BindingException { } }
LibBinder tli = typeLibs . get ( p ) ; if ( tli == null ) { typeLibs . put ( p , tli = new LibBinder ( p ) ) ; } return tli ;
public class RealtimeTuningConfig { /** * Might make sense for this to be a builder */ public static RealtimeTuningConfig makeDefaultTuningConfig ( final @ Nullable File basePersistDirectory ) { } }
return new RealtimeTuningConfig ( defaultMaxRowsInMemory , 0L , defaultIntermediatePersistPeriod , defaultWindowPeriod , basePersistDirectory == null ? createNewBasePersistDirectory ( ) : basePersistDirectory , defaultVersioningPolicy , defaultRejectionPolicyFactory , defaultMaxPendingPersists , defaultShardSpec , defa...
public class DuplicationTaskProcessor { /** * Deletes a content item in the destination space , but only if it does not exists in the * source manifest . * @ param spaceId * @ param contentId */ private void duplicateDeletion ( final String spaceId , final String contentId ) throws TaskExecutionFailedException { ...
if ( existsInSourceManifest ( spaceId , contentId ) ) { throw new TaskExecutionFailedException ( MessageFormat . format ( "item exists in source manifest and thus appears to be " + "missing content. account={0}, storeId={1}, spaceId={2}, contentId={3}" , this . dupTask . getAccount ( ) , this . dupTask . getSourceStor...
public class MagickUtil { /** * Converts an { @ code MagickImage } to a { @ code BufferedImage } which holds an CMYK ICC profile * @ param pImage the original { @ code MagickImage } * @ param pAlpha keep alpha channel * @ return a new { @ code BufferedImage } * @ throws MagickException if an exception occurs du...
Dimension size = pImage . getDimension ( ) ; int length = size . width * size . height ; // Retreive the ICC profile ICC_Profile profile = ICC_Profile . getInstance ( pImage . getColorProfile ( ) . getInfo ( ) ) ; ColorSpace cs = new ICC_ColorSpace ( profile ) ; int bands = cs . getNumComponents ( ) + ( pAlpha ? 1 : 0 ...
public class OriginField { /** * Reads attribute from text . * @ param line the text . */ public void strain ( Text line ) throws ParseException { } }
try { Iterator < Text > it = line . split ( '=' ) . iterator ( ) ; it . next ( ) ; Text token = it . next ( ) ; it = token . split ( ' ' ) . iterator ( ) ; name = it . next ( ) ; name . trim ( ) ; sessionID = it . next ( ) ; sessionID . trim ( ) ; sessionVersion = it . next ( ) ; sessionVersion . trim ( ) ; networkType...
public class TaskRuntime { /** * Deliver a message to the Task . This calls into the user supplied message handler . * @ param message the message to be delivered . */ public void deliver ( final byte [ ] message ) { } }
synchronized ( this . heartBeatManager ) { if ( this . currentStatus . isNotRunning ( ) ) { LOG . log ( Level . WARNING , "Trying to send a message to a task that is in state: {0}. Ignoring." , this . currentStatus . getState ( ) ) ; } else { try { this . deliverMessageToTask ( message ) ; } catch ( final TaskMessageHa...
public class AbstractMultipleOptionsTablePanel { /** * { @ inheritDoc } * Overridden to also enable / disable the added buttons ( " enable all " and " disable all " ) . */ @ Override public void setComponentEnabled ( boolean enabled ) { } }
super . setComponentEnabled ( enabled ) ; boolean enable = enabled && getModel ( ) . getRowCount ( ) > 0 ; enableAllButton . setEnabled ( enable ) ; disableAllButton . setEnabled ( enable ) ;
public class BrowserSessionImpl { /** * Check if the session is closed . If the closed flag is set to * true , throw an exception . * @ throws SISessionUnavailableException thrown if the session is closed */ void checkNotClosed ( ) throws SISessionUnavailableException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkNotClosed" ) ; synchronized ( this ) { if ( _closed ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkNotClosed" , "Object closed" ) ; throw new SISessionUnavailab...
public class LoggingSubsystemParser { /** * Reads the single { @ code name } attribute from an element . * @ param reader the reader to use * @ return the value of the { @ code name } attribute * @ throws XMLStreamException if the { @ code name } attribute is not present , there is more than one attribute on the ...
return readStringAttributeElement ( reader , Attribute . NAME . getLocalName ( ) ) ;
public class StopStrategies { /** * If the task executed time exceeds the specified time , the task will stop retry . * @ param time The max task executed time . * @ param timeUnit The time unit . * @ param < V > The return value type . * @ return The stop strategy predicate . */ public static < V > Predicate <...
return ctx -> ( System . currentTimeMillis ( ) - ctx . getStartTime ( ) ) >= timeUnit . toMillis ( time ) ;
public class TableMetaCache { /** * 处理desc table的结果 */ public static List < FieldMeta > parseTableMetaByDesc ( ResultSetPacket packet ) { } }
Map < String , Integer > nameMaps = new HashMap < String , Integer > ( 6 , 1f ) ; int index = 0 ; for ( FieldPacket fieldPacket : packet . getFieldDescriptors ( ) ) { nameMaps . put ( fieldPacket . getOriginalName ( ) , index ++ ) ; } int size = packet . getFieldDescriptors ( ) . size ( ) ; int count = packet . getFiel...
public class ClustersInner { /** * Stops a Kusto cluster . * @ param resourceGroupName The name of the resource group containing the Kusto cluster . * @ param clusterName The name of the Kusto cluster . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws Il...
return ServiceFuture . fromResponse ( beginStopWithServiceResponseAsync ( resourceGroupName , clusterName ) , serviceCallback ) ;
public class ClassFinder { /** * Scans class path and source path for files in given package . */ private void scanUserPaths ( PackageSymbol p , boolean includeSourcePath ) throws IOException { } }
Set < JavaFileObject . Kind > kinds = getPackageFileKinds ( ) ; Set < JavaFileObject . Kind > classKinds = EnumSet . copyOf ( kinds ) ; classKinds . remove ( JavaFileObject . Kind . SOURCE ) ; boolean wantClassFiles = ! classKinds . isEmpty ( ) ; Set < JavaFileObject . Kind > sourceKinds = EnumSet . copyOf ( kinds ) ; ...
public class ClusterManagerClient { /** * Sets the maintenance policy for a cluster . * < p > Sample code : * < pre > < code > * try ( ClusterManagerClient clusterManagerClient = ClusterManagerClient . create ( ) ) { * String projectId = " " ; * String zone = " " ; * String clusterId = " " ; * Maintenance...
SetMaintenancePolicyRequest request = SetMaintenancePolicyRequest . newBuilder ( ) . setProjectId ( projectId ) . setZone ( zone ) . setClusterId ( clusterId ) . setMaintenancePolicy ( maintenancePolicy ) . build ( ) ; return setMaintenancePolicy ( request ) ;
public class XClosureImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case XbasePackage . XCLOSURE__DECLARED_FORMAL_PARAMETERS : getDeclaredFormalParameters ( ) . clear ( ) ; return ; case XbasePackage . XCLOSURE__EXPRESSION : setExpression ( ( XExpression ) null ) ; return ; case XbasePackage . XCLOSURE__EXPLICIT_SYNTAX : setExplicitSyntax ( EXPLICIT_SYNTAX_EDEFAU...
public class JSR154Filter { public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { } }
HttpServletRequest srequest = ( HttpServletRequest ) request ; HttpServletResponse sresponse = ( HttpServletResponse ) response ; Request requestWrapper = null ; Response responseWrapper = null ; boolean root_filter = false ; // Do we need a root wrapper ? ThreadState state = state ( ) ; if ( _unwrappedDispatchSupporte...
public class CommandFaceDescriptor { /** * Configures the given button and command using the given configurer and the information * contained in this instance . * @ param button The button to be configured . Must not be null . * @ param command The command to be configured . May be null . * @ param configurer T...
Assert . notNull ( button , "button" ) ; Assert . notNull ( configurer , "configurer" ) ; configurer . configure ( button , command , this ) ;
public class GDominanceComparator { /** * Compares two solutions . * @ param solution1 Object representing the first < code > Solution < / code > . * @ param solution2 Object representing the second < code > Solution < / code > . * @ return - 1 , or 0 , or 1 if solution1 dominates solution2 , both are * non - d...
if ( solution1 == null ) { throw new JMetalException ( "Solution1 is null" ) ; } else if ( solution2 == null ) { throw new JMetalException ( "Solution2 is null" ) ; } else if ( solution1 . getNumberOfObjectives ( ) != solution2 . getNumberOfObjectives ( ) ) { throw new JMetalException ( "Cannot compare because solution...
public class AtlassianRepository { /** * { @ inheritDoc } */ public void setDocumentAsImplemeted ( String location ) throws Exception { } }
Vector < ? > args = CollectionUtil . toVector ( username , password , args ( URI . create ( URIUtil . raw ( location ) ) ) ) ; XmlRpcClient xmlrpc = getXmlRpcClient ( ) ; String msg = ( String ) xmlrpc . execute ( new XmlRpcRequest ( handler + ".setSpecificationAsImplemented" , args ) ) ; if ( ! ( "<success>" . equals ...
public class FctBnAccEntitiesProcessors { /** * < p > Lazy get PrcAccDocCogsRetrieve . < / p > * @ param pAddParam additional param * @ return requested PrcAccDocCogsRetrieve * @ throws Exception - an exception */ protected final PrcAccDocCogsRetrieve lazyGetPrcAccDocCogsRetrieve ( final Map < String , Object > p...
@ SuppressWarnings ( "unchecked" ) PrcAccDocCogsRetrieve < RS , IDocWarehouse > proc = ( PrcAccDocCogsRetrieve < RS , IDocWarehouse > ) this . processorsMap . get ( PrcAccDocCogsRetrieve . class . getSimpleName ( ) ) ; if ( proc == null ) { proc = new PrcAccDocCogsRetrieve < RS , IDocWarehouse > ( ) ; proc . setSrvWare...
public class SingleThreadEventExecutor { /** * Take the next { @ link Runnable } from the task queue and so will block if no task is currently present . * Be aware that this method will throw an { @ link UnsupportedOperationException } if the task queue , which was * created via { @ link # newTaskQueue ( ) } , does...
assert inEventLoop ( ) ; if ( ! ( taskQueue instanceof BlockingQueue ) ) { throw new UnsupportedOperationException ( ) ; } BlockingQueue < Runnable > taskQueue = ( BlockingQueue < Runnable > ) this . taskQueue ; for ( ; ; ) { ScheduledFutureTask < ? > scheduledTask = peekScheduledTask ( ) ; if ( scheduledTask == null )...