signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class StyleHelper { /** * Adds enum value style name to UIObject unless style is { @ code null } . * @ param uiObject Object to add style to * @ param style Style name */ public static < E extends Style . HasCssName > void addEnumStyleName ( final UIObject uiObject , final E style ) { } }
if ( style != null && style . getCssName ( ) != null && ! style . getCssName ( ) . isEmpty ( ) ) { uiObject . addStyleName ( style . getCssName ( ) ) ; }
public class ImportSupport { /** * Overall strategy : we have two entry points , acquireString ( ) and * acquireReader ( ) . The latter passes data through unbuffered if * possible ( but note that it is not always possible - - specifically * for cases where we must use the RequestDispatcher . The remaining * me...
if ( isAbsoluteUrl ) { // for absolute URLs , delegate to our peer BufferedReader r = new BufferedReader ( acquireReader ( ) ) ; StringBuffer sb = new StringBuffer ( ) ; int i ; // under JIT , testing seems to show this simple loop is as fast // as any of the alternatives while ( ( i = r . read ( ) ) != - 1 ) { sb . ap...
public class DSResultIterator { /** * ( non - Javadoc ) * @ see com . impetus . client . cassandra . query . ResultIterator # hasNext ( ) */ @ Override public boolean hasNext ( ) { } }
if ( fetchSize != 0 && ( count % fetchSize ) == 0 ) { try { results = populateEntities ( entityMetadata , client ) ; count = 0 ; } catch ( Exception e ) { throw new PersistenceException ( "Error while scrolling over results, Caused by :." , e ) ; } } if ( results != null && ! results . isEmpty ( ) && count < results . ...
public class NodeRule { /** * Creates an accessor that returns the unwrapped variable . */ protected final MethodSpec newGetter ( Strength strength , TypeName varType , String varName , Visibility visibility ) { } }
MethodSpec . Builder getter = MethodSpec . methodBuilder ( "get" + capitalize ( varName ) ) . addModifiers ( context . publicFinalModifiers ( ) ) . returns ( varType ) ; String type ; if ( varType . isPrimitive ( ) ) { type = varType . equals ( TypeName . INT ) ? "Int" : "Long" ; } else { type = "Object" ; } if ( stren...
public class Page { /** * Returns the set of pages that are linked from this page . Outlinks in a page might also point * to non - existing pages . They are not included in the result set . < b > Warning : < / b > Do not use * this for getting the number of outlinks with { @ link Page # getOutlinks ( ) } . size ( )...
Session session = wiki . __getHibernateSession ( ) ; session . beginTransaction ( ) ; // session . lock ( hibernatePage , LockMode . NONE ) ; session . buildLockRequest ( LockOptions . NONE ) . lock ( hibernatePage ) ; // Have to copy links here since getPage later will close the session . Set < Integer > tmpSet = new ...
public class ArchiveBase { /** * { @ inheritDoc } * @ see org . jboss . shrinkwrap . api . Archive # move ( org . jboss . shrinkwrap . api . ArchivePath , org . jboss . shrinkwrap . api . ArchivePath ) */ @ Override public T move ( ArchivePath source , ArchivePath target ) throws IllegalArgumentException , IllegalArc...
Validate . notNull ( source , "The source path was not specified" ) ; Validate . notNull ( target , "The target path was not specified" ) ; final Node nodeToMove = get ( source ) ; if ( null == nodeToMove ) { throw new IllegalArchivePathException ( source . get ( ) + " doesn't specify any node in the archive to move" )...
public class MetricQuery { /** * Returns the TSDB metric name . * @ return The TSDB metric name . */ @ JsonIgnore public String getTSDBMetricName ( ) { } }
StringBuilder sb = new StringBuilder ( ) ; sb . append ( getMetric ( ) ) . append ( DefaultTSDBService . DELIMITER ) . append ( getScope ( ) ) ; if ( _namespace != null && ! _namespace . isEmpty ( ) ) { sb . append ( DefaultTSDBService . DELIMITER ) . append ( getNamespace ( ) ) ; } return sb . toString ( ) ;
public class DefaultGroovyMethods { /** * Iterates through this aggregate Object transforming each item into a new value using the * < code > transform < / code > closure , returning a list of transformed values . * Example : * < pre class = " groovyTestCase " > def list = [ 1 , ' a ' , 1.23 , true ] * def type...
return ( List < T > ) collect ( self , new ArrayList < T > ( ) , transform ) ;
public class ViewpointsAndPerspectivesDocumentationTemplate { /** * Adds an " Architectural Views " section relating to a { @ link SoftwareSystem } from one or more files . * @ param softwareSystem the { @ link SoftwareSystem } the documentation content relates to * @ param files one or more File objects that point...
return addSection ( softwareSystem , "Architectural Views" , files ) ;
public class DistributedObjectCacheAdapter { /** * Returns < tt > true < / tt > if this map contains a mapping for the specified * key . * @ param key key whose presence in this map is to be tested . * @ param includeDiskCache true to check the specified key contained in the memory or disk * maps ; false to che...
ValidateUtility . objectNotNull ( key , "key" ) ; // return get ( key ) ! = null ; return cache . containsCacheId ( key ) ;
public class JCRCommandHelper { /** * traverses incoming node trying to find primary nt : resource node * @ param node * @ return nt : resource node * @ throws ItemNotFoundException * if no such node found * @ throws RepositoryException */ public static Node getNtResourceRecursively ( Node node ) throws ItemN...
if ( node . isNodeType ( "nt:resource" ) ) return node ; Item pi = node . getPrimaryItem ( ) ; if ( pi . isNode ( ) ) { return getNtResourceRecursively ( ( Node ) pi ) ; } throw new ItemNotFoundException ( "No nt:resource node found for " + node . getPath ( ) ) ;
public class TimeZone { /** * Return a new String array containing all system TimeZone IDs * associated with the given country . These IDs may be passed to * < code > get ( ) < / code > to construct the corresponding TimeZone * object . * @ param country a two - letter ISO 3166 country code , or < code > null <...
Set < String > ids = getAvailableIDs ( SystemTimeZoneType . ANY , country , null ) ; return ids . toArray ( new String [ 0 ] ) ;
public class XNumberLiteralImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case XbasePackage . XNUMBER_LITERAL__VALUE : setValue ( VALUE_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class MCFImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . MCF__RG : getRG ( ) . clear ( ) ; getRG ( ) . addAll ( ( Collection < ? extends MCFRG > ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class SeaGlassTabbedPaneUI { /** * Create a SynthContext for the component , subregion , and state . * @ param c the component . * @ param subregion the subregion . * @ param state the state . * @ return the newly created SynthContext . */ private SeaGlassContext getContext ( JComponent c , Region subreg...
SynthStyle style = null ; Class klass = SeaGlassContext . class ; if ( subregion == Region . TABBED_PANE_TAB ) { style = tabStyle ; } else if ( subregion == Region . TABBED_PANE_TAB_AREA ) { style = tabAreaStyle ; } else if ( subregion == Region . TABBED_PANE_CONTENT ) { style = tabContentStyle ; } else if ( subregion ...
public class Profile { /** * 将前后缀去除后 , 中间的 . 替换为 / < br > * 不以 / 开始 。 * @ param className */ public String getInfix ( String className ) { } }
String postfix = getActionSuffix ( ) ; String simpleName = className . substring ( className . lastIndexOf ( '.' ) + 1 ) ; if ( Strings . contains ( simpleName , postfix ) ) { simpleName = Strings . uncapitalize ( simpleName . substring ( 0 , simpleName . length ( ) - postfix . length ( ) ) ) ; } else { simpleName = St...
public class AmazonKinesisClient { /** * To deregister a consumer , provide its ARN . Alternatively , you can provide the ARN of the data stream and the name * you gave the consumer when you registered it . You may also provide all three parameters , as long as they don ' t * conflict with each other . If you don '...
request = beforeClientExecution ( request ) ; return executeDeregisterStreamConsumer ( request ) ;
public class Join { /** * A replacement for Java 8 ' s String . join ( ) . * @ param sep * The separator string . * @ param iterable * The { @ link Iterable } to join . * @ return The string representation of the joined elements . */ public static String join ( final String sep , final Iterable < ? > iterable...
final StringBuilder buf = new StringBuilder ( ) ; join ( buf , "" , sep , "" , iterable ) ; return buf . toString ( ) ;
public class AwsSecurityFinding { /** * Threat intel details related to a finding . * @ param threatIntelIndicators * Threat intel details related to a finding . */ public void setThreatIntelIndicators ( java . util . Collection < ThreatIntelIndicator > threatIntelIndicators ) { } }
if ( threatIntelIndicators == null ) { this . threatIntelIndicators = null ; return ; } this . threatIntelIndicators = new java . util . ArrayList < ThreatIntelIndicator > ( threatIntelIndicators ) ;
public class MaskUtil { /** * Return the mask bit for " getMaskPattern " at " x " and " y " . See 8.8 of JISX0510:2004 for mask * pattern conditions . */ static boolean getDataMaskBit ( int maskPattern , int x , int y ) { } }
int intermediate ; int temp ; switch ( maskPattern ) { case 0 : intermediate = ( y + x ) & 0x1 ; break ; case 1 : intermediate = y & 0x1 ; break ; case 2 : intermediate = x % 3 ; break ; case 3 : intermediate = ( y + x ) % 3 ; break ; case 4 : intermediate = ( ( y / 2 ) + ( x / 3 ) ) & 0x1 ; break ; case 5 : temp = y *...
public class HadoopUtils { /** * Utility for doing ctx . getCounter ( groupName , * counter . toString ( ) ) . increment ( 1 ) ; */ @ SuppressWarnings ( "rawtypes" ) public static void incCounter ( TaskInputOutputContext ctx , String groupName , Enum counter ) { } }
ctx . getCounter ( groupName , counter . toString ( ) ) . increment ( 1 ) ;
public class CommerceOrderItemUtil { /** * Returns the last commerce order item in the ordered set where commerceOrderId = & # 63 ; and CPInstanceId = & # 63 ; . * @ param commerceOrderId the commerce order ID * @ param CPInstanceId the cp instance ID * @ param orderByComparator the comparator to order the set by...
return getPersistence ( ) . fetchByC_I_Last ( commerceOrderId , CPInstanceId , orderByComparator ) ;
public class CmsRoleManager { /** * Adds a user to the given role . < p > * @ param cms the opencms context * @ param role the role * @ param username the name of the user that is to be added to the role * @ throws CmsException if something goes wrong */ public void addUserToRole ( CmsObject cms , CmsRole role ...
m_securityManager . addUserToGroup ( cms . getRequestContext ( ) , username , role . getGroupName ( ) , true ) ;
public class ConnectionPool { /** * Closes an unumanged connection . * @ param conn The conneciton . * @ throws SQLException If close fails . */ public final void closeUnmanagedConnection ( final Connection conn ) throws SQLException { } }
activeUnmanagedConnections . dec ( ) ; if ( ! conn . isClosed ( ) ) { conn . close ( ) ; }
public class CATProxyConsumer { /** * Send the entire message in one big buffer . If the messageSlices parameter is not null then * the message has already been encoded and does not need to be done again . This may be in the * case where the message was destined to be sent in chunks but is so small that it does not...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "sendEntireMessage" , new Object [ ] { sibMessage , messageSlices } ) ; int msgLen = 0 ; try { CommsServerByteBuffer buffer = poolManager . allocate ( ) ; ConversationState convState = ( ConversationState ) getConvers...
public class AttachmentMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Attachment attachment , ProtocolMarshaller protocolMarshaller ) { } }
if ( attachment == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( attachment . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( attachment . getType ( ) , TYPE_BINDING ) ; protocolMarshaller . marshall ( attachment . getStatus ( )...
public class CustomerNoteUrl { /** * Get Resource Url for GetAccountNotes * @ param accountId Unique identifier of the customer account . * @ param filter A set of filter expressions representing the search parameters for a query . This parameter is optional . Refer to [ Sorting and Filtering ] ( . . / . . / . . / ...
UrlFormatter formatter = new UrlFormatter ( "/api/commerce/customer/accounts/{accountId}/notes?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}" ) ; formatter . formatUrl ( "accountId" , accountId ) ; formatter . formatUrl ( "filter" , filter ) ; formatter . fo...
public class WrappedRecordReader { /** * Skip key - value pairs with keys less than or equal to the key provided . */ public void skip ( K key ) throws IOException { } }
if ( hasNext ( ) ) { while ( cmp . compare ( khead , key ) <= 0 && next ( ) ) ; }
public class TarEntry { /** * Parse an entry ' s TarHeader information from a header buffer . * Old unix - style code contributed by David Mehringer < dmehring @ astro . uiuc . edu > . * @ param hdr * The TarHeader to fill in from the buffer information . * @ param header * The tar entry header buffer to get ...
int offset = 0 ; // NOTE Recognize archive header format . if ( headerBuf [ 257 ] == 0 && headerBuf [ 258 ] == 0 && headerBuf [ 259 ] == 0 && headerBuf [ 260 ] == 0 && headerBuf [ 261 ] == 0 ) { this . unixFormat = true ; this . ustarFormat = false ; this . gnuFormat = false ; } else if ( headerBuf [ 257 ] == 'u' && he...
public class PluginContext { /** * { @ inheritDoc } */ @ Override public URL getResource ( String path ) { } }
if ( mResourceFactory == null ) { return null ; } return mResourceFactory . getResource ( path ) ;
public class XMLProperties { /** * Creates an object from the given class ' single argument constructor . * @ return The object created from the constructor . * If the constructor could not be invoked for any reason , null is * returned . */ private Object createInstance ( Class pClass , Object pParam ) { } }
Object value ; try { // Create param and argument arrays Class [ ] param = { pParam . getClass ( ) } ; Object [ ] arg = { pParam } ; // Get constructor Constructor constructor = pClass . getDeclaredConstructor ( param ) ; // Invoke and create instance value = constructor . newInstance ( arg ) ; } catch ( Exception e ) ...
public class Cache { /** * / / / / / Transactions / / / / / */ public Transaction beginTransaction ( ) { } }
Transaction txn = new Transaction ( rollbackSupported ) ; LOG . debug ( "Starting transaction: {}" , txn ) ; return txn ;
public class CmsEditableGroup { /** * Moves the given row up . * @ param row the row to move */ public void moveUp ( I_CmsEditableGroupRow row ) { } }
int index = m_container . getComponentIndex ( row ) ; if ( index > 0 ) { m_container . removeComponent ( row ) ; m_container . addComponent ( row , index - 1 ) ; } updateButtonBars ( ) ;
public class AbstractTwoPassStream { /** * closes the outputstream and calls { @ link # secondPass ( java . io . OutputStream ) } with the original outputstream . Note * that the original outputstream may be null when a subclass did not call { @ link # setOut ( java . io . OutputStream ) } * @ throws IOException */...
out . close ( ) ; if ( orig != null ) { secondPass ( new BufferedInputStream ( new FileInputStream ( tempFile ) , bufferSize ) , orig ) ; tempFile . delete ( ) ; }
public class BootstrapProgressBar { /** * Creates a Bitmap which is a tile of the progress bar background * @ param h the view height * @ return a bitmap of the progress bar background */ private static Bitmap createTile ( float h , Paint stripePaint , Paint progressPaint ) { } }
Bitmap bm = Bitmap . createBitmap ( ( int ) h * 2 , ( int ) h , ARGB_8888 ) ; Canvas tile = new Canvas ( bm ) ; float x = 0 ; Path path = new Path ( ) ; path . moveTo ( x , 0 ) ; path . lineTo ( x , h ) ; path . lineTo ( h , h ) ; tile . drawPath ( path , stripePaint ) ; // draw striped triangle path . reset ( ) ; path...
public class EntityRecognizerMetadata { /** * Entity types from the metadata of an entity recognizer . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setEntityTypes ( java . util . Collection ) } or { @ link # withEntityTypes ( java . util . Collection ) } i...
if ( this . entityTypes == null ) { setEntityTypes ( new java . util . ArrayList < EntityRecognizerMetadataEntityTypesListItem > ( entityTypes . length ) ) ; } for ( EntityRecognizerMetadataEntityTypesListItem ele : entityTypes ) { this . entityTypes . add ( ele ) ; } return this ;
public class PartialUniqueIndex { /** * Removes all mappings from this map . */ public void clear ( ) { } }
// clear out ref queue . We don ' t need to expunge entries // since table is getting cleared . emptySoftQueue ( ) ; Entry tab [ ] = table ; for ( int i = 0 ; i < tab . length ; ++ i ) tab [ i ] = null ; size = 0 ; // Allocation of array may have caused GC , which may have caused // additional entries to go stale . Rem...
public class GhostMe { /** * Apply Proxy * @ param use Proxy to use */ public static void applyProxy ( Proxy use ) { } }
System . setProperty ( "java.net.useSystemProxies" , "false" ) ; System . setProperty ( "http.proxyHost" , use . getIp ( ) ) ; System . setProperty ( "http.proxyPort" , String . valueOf ( use . getPort ( ) ) ) ; System . setProperty ( "https.proxyHost" , use . getIp ( ) ) ; System . setProperty ( "https.proxyPort" , St...
public class InMemoryEngine { /** * { @ inheritDoc } */ @ Override public < T extends Serializable > void saveObject ( String name , T serializableObject ) { } }
assertConnectionOpen ( ) ; try { Path rootPath = getRootPath ( storageName ) ; createDirectoryIfNotExists ( rootPath ) ; Path objectPath = new File ( rootPath . toFile ( ) , name ) . toPath ( ) ; Files . write ( objectPath , DeepCopy . serialize ( serializableObject ) ) ; } catch ( IOException ex ) { throw new Unchecke...
public class HelloSignClient { /** * Updates the API app with the given ApiApp object properties . * @ param app ApiApp * @ return ApiApp updated ApiApp * @ throws HelloSignException thrown if there ' s a problem processing the * HTTP request or the JSON response . */ public ApiApp updateApiApp ( ApiApp app ) t...
if ( ! app . hasClientId ( ) ) { throw new HelloSignException ( "Cannot update an ApiApp without a client ID. Create one first!" ) ; } String url = BASE_URI + API_APP_URI + "/" + app . getClientId ( ) ; return new ApiApp ( httpClient . withAuth ( auth ) . withPostFields ( app . getPostFields ( ) ) . post ( url ) . asJs...
public class EventClient { /** * Sends a synchronous get event request to the API . * @ param eid ID of the event to get * @ throws ExecutionException indicates an error in the HTTP backend * @ throws InterruptedException indicates an interruption during the HTTP operation * @ throws IOException indicates an er...
return getEvent ( getEventAsFuture ( eid ) ) ;
public class ModelsImpl { /** * Gets all custom prebuilt models information of this application . * @ param appId The application ID . * @ param versionId The version ID . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the List & lt ; CustomPrebuiltMode...
if ( this . client . endpoint ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.endpoint() is required and cannot be null." ) ; } if ( appId == null ) { throw new IllegalArgumentException ( "Parameter appId is required and cannot be null." ) ; } if ( versionId == null ) { throw new IllegalArgu...
public class AbstractRadial { /** * Sets the type of the pointer * @ param POINTER _ TYPE type of the pointer * PointerType . TYPE1 ( default ) * PointerType . TYPE2 * PointerType . TYPE3 * PointerType . TYPE4 */ public void setPointerType ( final PointerType POINTER_TYPE ) { } }
getModel ( ) . setPointerType ( POINTER_TYPE ) ; init ( getInnerBounds ( ) . width , getInnerBounds ( ) . height ) ; repaint ( getInnerBounds ( ) ) ;
public class PyExpressionGenerator { /** * Generate the given object . * @ param literal the boolean literal . * @ param it the target for the generated content . * @ param context the context . * @ return the literal . */ @ SuppressWarnings ( "static-method" ) protected XExpression _generate ( XBooleanLiteral ...
appendReturnIfExpectedReturnedExpression ( it , context ) ; it . append ( literal . isIsTrue ( ) ? "True" : "False" ) ; // $ NON - NLS - 1 $ / / $ NON - NLS - 2 $ return literal ;
public class PatternToken { /** * Tests whether the string token element matches a given token . * @ param token { @ link AnalyzedToken } to match against . * @ return True if matches . */ private boolean isStringTokenMatched ( AnalyzedToken token ) { } }
String testToken = getTestToken ( token ) ; if ( stringRegExp ) { Matcher m = pattern . matcher ( new InterruptibleCharSequence ( testToken ) ) ; return m . matches ( ) ; } if ( caseSensitive ) { return stringToken . equals ( testToken ) ; } return stringToken . equalsIgnoreCase ( testToken ) ;
public class Connector { /** * Helper method that creates a { @ link Path } object from a parent path and a child path string . This is equivalent to calling * " < code > pathFactory ( ) . create ( parentPath , childPath ) < / code > " , and is simply provided for convenience . * @ param parentPath the parent path ...
Path parent = pathFactory ( ) . create ( parentPath ) ; return pathFactory ( ) . create ( parent , childPath ) ;
public class DefaultGroovyMethods { /** * Provide a dynamic method invocation method which can be overloaded in * classes to implement dynamic proxies easily . * @ param object any Object * @ param method the name of the method to call * @ param arguments the arguments to use * @ return the result of the meth...
return InvokerHelper . invokeMethod ( object , method , arguments ) ;
public class LogSender { /** * Sends a group of log messages to Stackify * @ param group The log message group * @ return The HTTP status code returned from the HTTP POST * @ throws IOException */ public int send ( final LogMsgGroup group ) throws IOException { } }
Preconditions . checkNotNull ( group ) ; executeMask ( group ) ; executeSkipJsonTag ( group ) ; HttpClient httpClient = new HttpClient ( apiConfig ) ; // retransmit any logs on the resend queue resendQueue . drain ( httpClient , LOG_SAVE_PATH , true ) ; // convert to json bytes byte [ ] jsonBytes = objectMapper . write...
public class ClassUtils { /** * Returns given object class primitive class or self class . < br > * if given object class is 8 wrapper class then return primitive class . < br > * if given object class is null return null . * @ param object object to be handle . * @ return given object class primitive class or ...
if ( object == null ) { return null ; } return getPrimitiveClass ( object . getClass ( ) ) ;
public class RemoteCommand { /** * Executes the default action of the command with the information provided * in the Form . This form must be the answer form of the previous stage . If * there is a problem executing the command it throws an XMPPException . * @ param form the form answer of the previous stage . ...
executeAction ( Action . execute , form ) ;
public class ApiOvhEmailmxplan { /** * create new external contact * REST : POST / email / mxplan / { service } / externalContact * @ param firstName [ required ] Contact first name * @ param initials [ required ] Contact initials * @ param lastName [ required ] Contact last name * @ param externalEmailAddres...
String qPath = "/email/mxplan/{service}/externalContact" ; StringBuilder sb = path ( qPath , service ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "displayName" , displayName ) ; addBody ( o , "externalEmailAddress" , externalEmailAddress ) ; addBody ( o , "firstName" , firstNa...
public class nsrpcnode { /** * Use this API to update nsrpcnode resources . */ public static base_responses update ( nitro_service client , nsrpcnode resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { nsrpcnode updateresources [ ] = new nsrpcnode [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new nsrpcnode ( ) ; updateresources [ i ] . ipaddress = resources [ i ] . ipaddress ; upd...
public class nshttpprofile { /** * Use this API to fetch filtered set of nshttpprofile resources . * filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */ public static nshttpprofile [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
nshttpprofile obj = new nshttpprofile ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; nshttpprofile [ ] response = ( nshttpprofile [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class MicronautConsole { /** * Add a shutdown hook . */ public void addShutdownHook ( ) { } }
shutdownHookThread = new Thread ( new Runnable ( ) { @ Override public void run ( ) { beforeShutdown ( ) ; } } ) ; Runtime . getRuntime ( ) . addShutdownHook ( shutdownHookThread ) ;
public class HtmlPolicyBuilder { /** * Disallows the given elements from appearing without attributes . * @ see # DEFAULT _ SKIP _ IF _ EMPTY * @ see # allowWithoutAttributes */ public HtmlPolicyBuilder disallowWithoutAttributes ( String ... elementNames ) { } }
invalidateCompiledState ( ) ; for ( String elementName : elementNames ) { elementName = HtmlLexer . canonicalName ( elementName ) ; skipIfEmpty . add ( elementName ) ; } return this ;
public class CmsSearchIndexSource { /** * Sets the logical key / name of this search index source . < p > * @ param name the logical key / name of this search index source * @ throws CmsIllegalArgumentException if argument name is null , an empty or whitespace - only Strings * or already used for another indexsou...
if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( name ) ) { throw new CmsIllegalArgumentException ( Messages . get ( ) . container ( Messages . ERR_INDEXSOURCE_CREATE_MISSING_NAME_0 ) ) ; } // already used ? Don ' t test this at xml - configuration time ( no manager ) if ( OpenCms . getRunLevel ( ) > OpenCms . RUNLEVEL_2...
public class Model { /** * Sets the given buffered image as the custom layer of the gauge * @ param CUSTOM _ LAYER */ public void setCustomLayer ( final BufferedImage CUSTOM_LAYER ) { } }
if ( customLayer != null ) { customLayer . flush ( ) ; } customLayer = CUSTOM_LAYER ; fireStateChanged ( ) ;
public class AbstractHibernateDao { /** * Get the first element in the list * @ param list * @ return null if the list is null or is empty , otherwise the first element of the list */ public static < E > E firstInList ( List < E > list ) { } }
if ( list == null || list . size ( ) == 0 ) { return null ; } else { return list . get ( 0 ) ; }
public class RuleModelUpgradeHelper2 { /** * Descent into the model */ private void fixConnectiveConstraints ( IPattern p ) { } }
if ( p instanceof FactPattern ) { fixConnectiveConstraints ( ( FactPattern ) p ) ; } else if ( p instanceof CompositeFactPattern ) { fixConnectiveConstraints ( ( CompositeFactPattern ) p ) ; }
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getLocalDateAndTimeStampStampType ( ) { } }
if ( localDateAndTimeStampStampTypeEEnum == null ) { localDateAndTimeStampStampTypeEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 90 ) ; } return localDateAndTimeStampStampTypeEEnum ;
public class CodeChunkUtils { /** * Outputs a stringified parameter list ( e . g . ` foo , bar , baz ` ) from JsDoc . Used e . g . in function * and method declarations . */ static String generateParamList ( JsDoc jsDoc ) { } }
ImmutableList < JsDoc . Param > params = jsDoc . params ( ) ; List < String > functionParameters = new ArrayList < > ( ) ; for ( JsDoc . Param param : params ) { if ( "param" . equals ( param . annotationType ( ) ) ) { functionParameters . add ( param . paramTypeName ( ) ) ; } } StringBuilder sb = new StringBuilder ( )...
public class InstanceAdminClient { /** * Lists all instances in the given project . * < p > Sample code : * < pre > < code > * try ( InstanceAdminClient instanceAdminClient = InstanceAdminClient . create ( ) ) { * ProjectName parent = ProjectName . of ( " [ PROJECT ] " ) ; * for ( Instance element : instanceA...
ListInstancesRequest request = ListInstancesRequest . newBuilder ( ) . setParent ( parent ) . build ( ) ; return listInstances ( request ) ;
public class PoolOperations { /** * Stops a pool resize operation . * @ param poolId * The ID of the pool . * @ param additionalBehaviors * A collection of { @ link BatchClientBehavior } instances that are * applied to the Batch service request . * @ throws BatchErrorException * Exception thrown when an e...
PoolStopResizeOptions options = new PoolStopResizeOptions ( ) ; BehaviorManager bhMgr = new BehaviorManager ( this . customBehaviors ( ) , additionalBehaviors ) ; bhMgr . applyRequestBehaviors ( options ) ; this . parentBatchClient . protocolLayer ( ) . pools ( ) . stopResize ( poolId , options ) ;
public class CardAPI { /** * 设置自助核销功能 * @ param accessToken accessToken * @ param cardSet cardSet * @ return result */ public static BaseResult selfconsumecellSet ( String accessToken , PaySellSet cardSet ) { } }
return selfconsumecellSet ( accessToken , JsonUtil . toJSONString ( cardSet ) ) ;
public class OpenPgpContact { /** * Mark a key as { @ link OpenPgpStore . Trust # trusted } . * @ param fingerprint { @ link OpenPgpV4Fingerprint } of the key to mark as trusted . * @ throws IOException IO error */ public void trust ( OpenPgpV4Fingerprint fingerprint ) throws IOException { } }
store . setTrust ( getJid ( ) , fingerprint , OpenPgpTrustStore . Trust . trusted ) ;
public class VertxResponseWriter { /** * { @ inheritDoc } */ @ Override public void failure ( Throwable error ) { } }
logger . error ( error . getMessage ( ) , error ) ; HttpServerResponse response = vertxRequest . response ( ) ; // Set error status and end Response . Status status = Response . Status . INTERNAL_SERVER_ERROR ; response . setStatusCode ( status . getStatusCode ( ) ) ; response . setStatusMessage ( status . getReasonPhr...
public class FileRandomAccessStream { /** * Returns an InputStream for this stream . */ public InputStream getInputStream ( ) throws IOException { } }
if ( _is == null ) _is = new FileInputStream ( _file . getFD ( ) ) ; return _is ;
public class CommerceCurrencyPersistenceImpl { /** * Returns all the commerce currencies where groupId = & # 63 ; . * @ param groupId the group ID * @ return the matching commerce currencies */ @ Override public List < CommerceCurrency > findByGroupId ( long groupId ) { } }
return findByGroupId ( groupId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class Input { /** * Reads count bytes and writes them to the specified byte [ ] , starting at offset . */ public void readBytes ( byte [ ] bytes , int offset , int count ) throws KryoException { } }
if ( bytes == null ) throw new IllegalArgumentException ( "bytes cannot be null." ) ; int copyCount = Math . min ( limit - position , count ) ; while ( true ) { System . arraycopy ( buffer , position , bytes , offset , copyCount ) ; position += copyCount ; count -= copyCount ; if ( count == 0 ) break ; offset += copyCo...
public class FileView { /** * - - - - - Getters and Setters end */ @ Override public void render ( ) { } }
if ( null == this . file ) { throw new RenderException ( "File param is null !" ) ; } if ( false == file . exists ( ) ) { throw new RenderException ( StrUtil . format ( "File [{}] not exist !" , file ) ) ; } if ( false == file . isFile ( ) ) { throw new RenderException ( StrUtil . format ( "File [{}] not a file !" , fi...
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getFinishingOperationFOpType ( ) { } }
if ( finishingOperationFOpTypeEEnum == null ) { finishingOperationFOpTypeEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 186 ) ; } return finishingOperationFOpTypeEEnum ;
public class CoronaConf { /** * Get the pool info . In order to support previous behavior , a single pool * name is accepted . * @ return Pool info , using a default pool group if the * explicit pool can not be found */ public PoolInfo getPoolInfo ( ) { } }
String poolNameProperty = get ( IMPLICIT_POOL_PROPERTY , "user.name" ) ; String explicitPool = get ( EXPLICIT_POOL_PROPERTY , get ( poolNameProperty , "" ) ) . trim ( ) ; String [ ] poolInfoSplitString = explicitPool . split ( "[.]" ) ; if ( poolInfoSplitString != null && poolInfoSplitString . length == 2 ) { return ne...
public class OpenAPIFilter { /** * { @ inheritDoc } */ @ Override public Operation visitOperation ( Context context , Operation operation ) { } }
return filter . filterOperation ( operation ) ;
public class ParameterReferenceImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public Parameter getParameter ( ) { } }
if ( parameter != null && parameter . eIsProxy ( ) ) { InternalEObject oldParameter = ( InternalEObject ) parameter ; parameter = ( Parameter ) eResolveProxy ( oldParameter ) ; if ( parameter != oldParameter ) { if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . RESOLVE , XtextPack...
public class MariaDbDatabaseMetaData { /** * Retrieves a description of the given table ' s primary key columns . They are ordered by * COLUMN _ NAME . * < P > Each primary key column description has the following columns : < / p > * < OL > * < li > < B > TABLE _ CAT < / B > String { @ code = > } table catalog ...
// MySQL 8 now use ' PRI ' in place of ' pri ' String sql = "SELECT A.TABLE_SCHEMA TABLE_CAT, NULL TABLE_SCHEM, A.TABLE_NAME, A.COLUMN_NAME, B.SEQ_IN_INDEX KEY_SEQ, B.INDEX_NAME PK_NAME " + " FROM INFORMATION_SCHEMA.COLUMNS A, INFORMATION_SCHEMA.STATISTICS B" + " WHERE A.COLUMN_KEY in ('PRI','pri') AND B.INDEX_NAME='PR...
public class ImageFlow { /** * Changes the shape to match the specified dimension . Memory will only be created / destroyed if the requested * size is larger than any previously requested size * @ param width New image width * @ param height new image height */ public void reshape ( int width , int height ) { } }
int N = width * height ; if ( data . length < N ) { D tmp [ ] = new D [ N ] ; System . arraycopy ( data , 0 , tmp , 0 , data . length ) ; for ( int i = data . length ; i < N ; i ++ ) tmp [ i ] = new D ( ) ; data = tmp ; } this . width = width ; this . height = height ;
public class RetryOnFailureXSiteCommand { /** * Invokes remotely the command using the { @ code Transport } passed as parameter . * @ param rpcManager the { @ link RpcManager } to use . * @ param waitTimeBetweenRetries the waiting time if the command fails before retrying it . * @ param unit the { @ link java . u...
if ( backups . isEmpty ( ) ) { if ( debug ) { log . debugf ( "Executing '%s' but backup list is empty." , this ) ; } return ; } assertNotNull ( rpcManager , "RpcManager" ) ; assertNotNull ( unit , "TimeUnit" ) ; assertGreaterThanZero ( waitTimeBetweenRetries , "WaitTimeBetweenRetries" ) ; do { if ( trace ) { log . trac...
public class ExternalServiceAlertConditionsDeserializer { /** * Gson invokes this call - back method during deserialization when it encounters a field of the specified type . * @ param element The Json data being deserialized * @ param type The type of the Object to deserialize to * @ param context The JSON deser...
JsonObject obj = element . getAsJsonObject ( ) ; JsonArray conditions = obj . getAsJsonArray ( "external_service_conditions" ) ; List < ExternalServiceAlertCondition > values = new ArrayList < ExternalServiceAlertCondition > ( ) ; if ( conditions != null && conditions . isJsonArray ( ) ) { for ( JsonElement condition :...
public class TopicsInner { /** * List keys for a topic . * List the two keys used to publish to a topic . * @ param resourceGroupName The name of the resource group within the user ' s subscription . * @ param topicName Name of the topic * @ throws IllegalArgumentException thrown if parameters fail the validati...
return listSharedAccessKeysWithServiceResponseAsync ( resourceGroupName , topicName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class RemoteInputChannel { /** * Retriggers a remote subpartition request . */ void retriggerSubpartitionRequest ( int subpartitionIndex ) throws IOException , InterruptedException { } }
checkState ( partitionRequestClient != null , "Missing initial subpartition request." ) ; if ( increaseBackoff ( ) ) { partitionRequestClient . requestSubpartition ( partitionId , subpartitionIndex , this , getCurrentBackoff ( ) ) ; } else { failPartitionRequest ( ) ; }
public class Messages { /** * Count the number of occurrences of a given wildcard . * @ param templateMessage * Input string * @ param occurrence * String searched . * @ return The number of occurrences . */ private static int countWildcardsOccurrences ( String templateMessage , String occurrence ) { } }
if ( templateMessage != null && occurrence != null ) { final Pattern pattern = Pattern . compile ( occurrence ) ; final Matcher matcher = pattern . matcher ( templateMessage ) ; int count = 0 ; while ( matcher . find ( ) ) { count ++ ; } return count ; } else { return 0 ; }
public class DefaultBeanContext { /** * Get a bean provider . * @ param resolutionContext The bean resolution context * @ param beanType The bean type * @ param qualifier The qualifier * @ param < T > The bean type parameter * @ return The bean provider */ protected @ Nonnull < T > Provider < T > getBeanProvi...
ArgumentUtils . requireNonNull ( "beanType" , beanType ) ; @ SuppressWarnings ( "unchecked" ) BeanRegistration < T > beanRegistration = singletonObjects . get ( new BeanKey ( beanType , qualifier ) ) ; if ( beanRegistration != null ) { return new ResolvedProvider < > ( beanRegistration . bean ) ; } Optional < BeanDefin...
public class HBaseDataHandler { /** * Write values to entity . * @ param entity * the entity * @ param hbaseData * the hbase data * @ param m * the m * @ param metaModel * the meta model * @ param attributes * the attributes * @ param relationNames * the relation names * @ param relations * ...
for ( Attribute attribute : attributes ) { Class javaType = ( ( AbstractAttribute ) attribute ) . getBindableJavaType ( ) ; if ( metaModel . isEmbeddable ( javaType ) ) { processEmbeddable ( entity , hbaseData , m , metaModel , count , prefix , attribute , javaType ) ; } else if ( ! attribute . isCollection ( ) ) { Str...
public class V1Instance { /** * Try to find an asset in the asset cache or create one for this entity . * @ param entity asset will be found for . * @ return An asset that will exist in the asset cache . */ private Asset getAsset ( Entity entity ) { } }
return getAsset ( entity . getInstanceKey ( ) , getAssetTypeToken ( entity . getClass ( ) ) ) ;
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcSurfaceSide createIfcSurfaceSideFromString ( EDataType eDataType , String initialValue ) { } }
IfcSurfaceSide result = IfcSurfaceSide . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class JsJmsTextMessageImpl { /** * Get the body ( payload ) of the message . * Javadoc description supplied by JsJmsTextMessage interface . */ public String getText ( ) throws UnsupportedEncodingException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getText" ) ; String text = null ; try { text = ( String ) getPayload ( ) . getField ( JmsTextBodyAccess . BODY_DATA_VALUE ) ; } catch ( MFPUnsupportedEncodingRuntimeException e ) { FFDCFilter . processException ( e ,...
public class SamlIdPObjectSigner { /** * Gets signing private key . * @ return the signing private key * @ throws Exception the exception */ protected PrivateKey getSigningPrivateKey ( ) throws Exception { } }
val samlIdp = casProperties . getAuthn ( ) . getSamlIdp ( ) ; val signingKey = samlIdPMetadataLocator . getSigningKey ( ) ; val privateKeyFactoryBean = new PrivateKeyFactoryBean ( ) ; privateKeyFactoryBean . setLocation ( signingKey ) ; privateKeyFactoryBean . setAlgorithm ( samlIdp . getMetadata ( ) . getPrivateKeyAlg...
public class CommerceWarehousePersistenceImpl { /** * Returns all the commerce warehouses where groupId = & # 63 ; and active = & # 63 ; and commerceCountryId = & # 63 ; . * @ param groupId the group ID * @ param active the active * @ param commerceCountryId the commerce country ID * @ return the matching comme...
return findByG_A_C ( groupId , active , commerceCountryId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class IRSEndpointMonitor { /** * Decorate method * @ param mfc * @ return */ @ Override public String getMessageToClient ( String mfc ) { } }
HttpSession httpSession = iRSEndpoint . getHttpSession ( ) ; String httpid = httpSession . getId ( ) ; boolean monitored = monitorSessionManager . isMonitored ( httpid ) ; long t0 = 0 ; if ( monitored ) { t0 = System . currentTimeMillis ( ) ; } String mtc = iRSEndpoint . getMessageToClient ( mfc ) ; if ( monitored ) { ...
public class MemcachedConnection { /** * Register Metrics for collection . * Note that these Metrics may or may not take effect , depending on the * { @ link MetricCollector } implementation . This can be controlled from * the { @ link DefaultConnectionFactory } . */ protected void registerMetrics ( ) { } }
if ( metricType . equals ( MetricType . DEBUG ) || metricType . equals ( MetricType . PERFORMANCE ) ) { metrics . addHistogram ( OVERALL_AVG_BYTES_READ_METRIC ) ; metrics . addHistogram ( OVERALL_AVG_BYTES_WRITE_METRIC ) ; metrics . addHistogram ( OVERALL_AVG_TIME_ON_WIRE_METRIC ) ; metrics . addMeter ( OVERALL_RESPONS...
public class Iterate { /** * Returns the BigDecimal sum of the result of applying the function to each element of the iterable . * @ since 6.0 */ public static < T > BigDecimal sumOfBigDecimal ( Iterable < T > iterable , Function < ? super T , BigDecimal > function ) { } }
if ( iterable instanceof List ) { return ListIterate . sumOfBigDecimal ( ( List < T > ) iterable , function ) ; } if ( iterable != null ) { return IterableIterate . sumOfBigDecimal ( iterable , function ) ; } throw new IllegalArgumentException ( "Cannot perform an sumOfBigDecimal on null" ) ;
public class JvmGenericTypeImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case TypesPackage . JVM_GENERIC_TYPE__TYPE_PARAMETERS : getTypeParameters ( ) . clear ( ) ; return ; case TypesPackage . JVM_GENERIC_TYPE__INTERFACE : setInterface ( INTERFACE_EDEFAULT ) ; return ; case TypesPackage . JVM_GENERIC_TYPE__STRICT_FLOATING_POINT : setStrictFloatingPoint ( STRICT_FLOAT...
public class ReceiveMessageActionParser { /** * Construct the XPath message validation context . * @ param messageElement * @ param parentContext * @ return */ private XpathMessageValidationContext getXPathMessageValidationContext ( Element messageElement , XmlMessageValidationContext parentContext ) { } }
XpathMessageValidationContext context = new XpathMessageValidationContext ( ) ; parseXPathValidationElements ( messageElement , context ) ; context . setControlNamespaces ( parentContext . getControlNamespaces ( ) ) ; context . setNamespaces ( parentContext . getNamespaces ( ) ) ; context . setIgnoreExpressions ( paren...
public class MessageBean { /** * Set error location in source document . * @ param locator current location during parsing * @ return message bean with location set */ public MessageBean setLocation ( final Locator locator ) { } }
if ( locator == null ) { return this ; } final MessageBean ret = new MessageBean ( this ) ; if ( locator . getSystemId ( ) != null ) { try { ret . srcFile = new URI ( locator . getSystemId ( ) ) ; } catch ( final URISyntaxException e ) { throw new RuntimeException ( "Failed to parse URI '" + locator . getSystemId ( ) +...
public class RedHbApi { /** * 发送红包 * @ param params 请求参数 * @ param certPath 证书文件目录 * @ param partnerKey 证书密码 * @ return { String } */ public static String sendRedPack ( Map < String , String > params , String certPath , String partnerKey ) { } }
return HttpUtils . postSSL ( sendRedPackUrl , PaymentKit . toXml ( params ) , certPath , partnerKey ) ;
public class Interval { /** * Creates a new interval with the specified start instant . * @ param start the start instant for the new interval , null means now * @ return an interval with the end from this interval and the specified start * @ throws IllegalArgumentException if the resulting interval has end befor...
long startMillis = DateTimeUtils . getInstantMillis ( start ) ; return withStartMillis ( startMillis ) ;
public class AbstractMapBasedWALDAO { /** * Mark an item as " no longer deleted " without actually adding it to the map . * This method only triggers the update action but does not alter the item . * Must only be invoked inside a write - lock . * @ param aItem * The item that was marked as " no longer deleted "...
// Trigger save changes super . markAsChanged ( aItem , EDAOActionType . UPDATE ) ; if ( bInvokeCallbacks ) { // Invoke callbacks m_aCallbacks . forEach ( aCB -> aCB . onMarkItemUndeleted ( aItem ) ) ; }
public class DiskUtils { /** * Returns directory name to save temporary files in the external storage for temporary < p > * This method always returns path of external storage even if it does not exist . < br > * As such , make sure to call isExternalStorageMounted method as state - testing method and then call thi...
return Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) + DATA_FOLDER + File . separator + context . getPackageName ( ) + TEMPORARY_FOLDER ;
public class PDPageContentStreamExt { /** * Set the line dash pattern . * @ param pattern * The pattern array * @ param phase * The phase of the pattern * @ throws IOException * If the content stream could not be written . * @ throws IllegalStateException * If the method was called within a text block ....
if ( inTextMode ) { throw new IllegalStateException ( "Error: setLineDashPattern is not allowed within a text block." ) ; } write ( ( byte ) '[' ) ; for ( final float value : pattern ) { writeOperand ( value ) ; } write ( ( byte ) ']' , ( byte ) ' ' ) ; writeOperand ( phase ) ; writeOperator ( ( byte ) 'd' ) ;
public class KunderaWeb3jClient { /** * Destroy . */ public void destroy ( ) { } }
if ( em != null ) { em . close ( ) ; LOGGER . info ( "Kundera EM closed..." ) ; } if ( emf != null ) { emf . close ( ) ; LOGGER . info ( "Kundera EMF closed..." ) ; }