signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class GroovyScript2RestLoader { /** * This method is useful for clients that send scripts as file in * ' multipart / * ' request body . * NOTE even we use iterator item should be only one , rule one address - one * script . This method is created just for comfort loading script from HTML * form . NOT use...
"multipart/*" } ) @ Path ( "add/{repository}/{workspace}/{path:.*}" ) public Response addScript ( Iterator < FileItem > items , @ Context UriInfo uriInfo , @ PathParam ( "repository" ) String repository , @ PathParam ( "workspace" ) String workspace , @ PathParam ( "path" ) String path ) { Session ses = null ; try { se...
public class QueryExecuter { /** * Gets neighborhood of the source set . * @ param sourceSet seed to the query * @ param model BioPAX model * @ param limit neigborhood distance to get * @ param direction UPSTREAM , DOWNSTREAM or BOTHSTREAM * @ param filters for filtering graph elements * @ return BioPAX ele...
Graph graph ; if ( model . getLevel ( ) == BioPAXLevel . L3 ) { if ( direction == Direction . UNDIRECTED ) { graph = new GraphL3Undirected ( model , filters ) ; direction = Direction . BOTHSTREAM ; } else { graph = new GraphL3 ( model , filters ) ; } } else return Collections . emptySet ( ) ; Set < Node > source = prep...
public class LssClient { /** * List all your live presets . * @ return The list of all your live presets */ public ListPresetsResponse listPresets ( ) { } }
ListPresetsRequest request = new ListPresetsRequest ( ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , LIVE_PRESET ) ; return invokeHttpClient ( internalRequest , ListPresetsResponse . class ) ;
public class BkBasic { /** * Adds custom headers with information about socket . * @ param req Request * @ param socket Socket * @ return Request with custom headers */ @ SuppressWarnings ( "PMD.AvoidDuplicateLiterals" ) private static Request addSocketHeaders ( final Request req , final Socket socket ) { } }
return new RqWithHeaders ( req , String . format ( "%s: %s" , BkBasic . LOCALADDR , socket . getLocalAddress ( ) . getHostAddress ( ) ) , String . format ( "%s: %d" , BkBasic . LOCALPORT , socket . getLocalPort ( ) ) , String . format ( "%s: %s" , BkBasic . REMOTEADDR , socket . getInetAddress ( ) . getHostAddress ( ) ...
public class BeanGenerator { /** * TODO To complete . * @ param javaClass * @ param body */ private void writePropertyGetter ( final JavaClassSource javaClass , final Property propDef ) { } }
if ( propDef . needGetter ( ) && propDef . needProperty ( ) ) { if ( ! javaClass . hasMethodSignature ( propDef . getPropertyName ( ) ) ) { final StringBuilder javadoc = new StringBuilder ( ) ; javadoc . append ( "@return the pSourcePath\n" ) ; String body = "" ; if ( propDef . isList ( ) ) { javaClass . addImport ( "j...
public class PubSubInputHandler { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . impl . interfaces . DownstreamControl # sendAckExpectedMessage ( long , com . ibm . ws . sib . trm . topology . Cellule , int , com . ibm . ws . sib . common . Reliability ) */ @ Override public void sendAckExpectedMe...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendAckExpectedMessage" , new Object [ ] { new Long ( ackExpStamp ) , new Integer ( priority ) , reliability , stream } ) ; HashMap allPubSubOutputHandlers = _destination . getAllPubSubOutputHandlers ( ) ; try { Iterator it...
public class QuickDiagnosingMatcherBase { /** * Returns a { @ link MatchResult } that caches the mismatch descripton . * @ param < I > * @ param item * @ return match result */ @ Override public < I > MatchResult < I > matchResult ( I item ) { } }
StringDescription mismatch = new StringDescription ( ) ; if ( matches ( item , mismatch ) ) { return new MatchResultSuccess < > ( item , this ) ; } else { return new MatchResultMismatch < > ( item , this , mismatch . toString ( ) ) ; }
public class StringMap { public Object get ( String key ) { } }
if ( key == null ) return _nullValue ; Map . Entry entry = getEntry ( key , 0 , key . length ( ) ) ; if ( entry == null ) return null ; return entry . getValue ( ) ;
public class Types { /** * Recursively skip type - variables until a class / array type is found ; capture conversion is then * ( optionally ) applied to the resulting type . This is useful for i . e . computing a site that is * suitable for a method lookup . */ public Type skipTypeVars ( Type site , boolean captur...
while ( site . hasTag ( TYPEVAR ) ) { site = site . getUpperBound ( ) ; } return capture ? capture ( site ) : site ;
public class RequestMessage { /** * Sets a list of vbuckets to stream keys from . * @ param vbs - A list of vbuckets . */ public void setVbucketlist ( short [ ] vbs ) { } }
int oldSize = ( vblist . length + 1 ) * 2 ; int newSize = ( vbs . length + 1 ) * 2 ; totalbody += newSize - oldSize ; vblist = vbs ;
public class MtasSolrComponentFacet { /** * ( non - Javadoc ) * @ see * mtas . solr . handler . component . util . MtasSolrComponent # modifyRequest ( org . apache * . solr . handler . component . ResponseBuilder , * org . apache . solr . handler . component . SearchComponent , * org . apache . solr . handler...
if ( sreq . params . getBool ( MtasSolrSearchComponent . PARAM_MTAS , false ) && sreq . params . getBool ( PARAM_MTAS_FACET , false ) ) { if ( ( sreq . purpose & ShardRequest . PURPOSE_GET_TOP_IDS ) != 0 ) { // do nothing } else { // remove prefix for other requests Set < String > keys = MtasSolrResultUtil . getIdsFrom...
public class TagVFilter { /** * Asynchronously resolves the tagk name to it ' s UID . On a successful lookup * the { @ link tagk _ bytes } will be set . * @ param tsdb The TSDB to use for the lookup * @ return A deferred to let the caller know that the lookup was completed . * The value will be the tag UID ( un...
class ResolvedCB implements Callback < byte [ ] , byte [ ] > { @ Override public byte [ ] call ( final byte [ ] uid ) throws Exception { tagk_bytes = uid ; return uid ; } } return tsdb . getUIDAsync ( UniqueIdType . TAGK , tagk ) . addCallback ( new ResolvedCB ( ) ) ;
public class SearchPortletController { /** * Performs a search of the explicitly configured { @ link IPortalSearchService } s . This is done as * an event handler so that it can run concurrently with the other portlets handling the search * request */ @ SuppressWarnings ( "unchecked" ) @ EventMapping ( SearchConsta...
// UP - 3887 Design flaw . Both the searchLauncher portlet instance and the search portlet // instance receive // searchRequest and searchResult events because they are in the same portlet code base ( to // share // autosuggest _ handler . jsp and because we have to calculate the search portlet url for the // ajax call...
public class Scope { /** * Set scope persistence class * @ param persistenceClass * Scope ' s persistence class * @ throws Exception * Exception */ public void setPersistenceClass ( String persistenceClass ) throws Exception { } }
this . persistenceClass = persistenceClass ; if ( persistenceClass != null ) { store = PersistenceUtils . getPersistenceStore ( this , persistenceClass ) ; }
public class AuthRundeckStorageTree { /** * Generate the environment for a path , based on the convention that / project / name / * maps to a project called * " name " , and anything else is within the application environment . * @ param path path * @ return authorization environment : a project environment if th...
String [ ] paths = path . getPath ( ) . split ( "/" ) ; if ( paths != null && paths . length > 2 && paths [ 0 ] . equals ( PROJECT_PATH_COMPONENT ) ) { return FrameworkProject . authorizationEnvironment ( paths [ 1 ] ) ; } else { return Framework . RUNDECK_APP_ENV ; }
public class Calendar { /** * Reconstitutes this object from a stream ( i . e . , deserialize it ) . */ private void readObject ( ObjectInputStream stream ) throws IOException , ClassNotFoundException { } }
final ObjectInputStream input = stream ; input . defaultReadObject ( ) ; stamp = new int [ FIELD_COUNT ] ; // Starting with version 2 ( not implemented yet ) , we expect that // fields [ ] , isSet [ ] , isTimeSet , and areFieldsSet may not be // streamed out anymore . We expect ' time ' to be correct . if ( serialVersi...
public class CacheObjectUtil { /** * remove the cached object . * @ param cacheConfigBean the data source configuration * @ param cacheKey the key of the cache * @ return the single observable for the result , true on success , false if nothing changed , error on exception . */ public static Single < Boolean > re...
return SingleRxXian . call ( CacheService . CACHE_SERVICE , "cacheObjectRemove" , new JSONObject ( ) { { put ( "cacheConfig" , cacheConfigBean ) ; put ( "key" , cacheKey ) ; } } ) . map ( unitResponseObject -> { unitResponseObject . throwExceptionIfNotSuccess ( ) ; return unitResponseObject . succeeded ( ) ; } ) ;
public class ApiOvhHostingprivateDatabase { /** * Create a new IP whitelist * REST : POST / hosting / privateDatabase / { serviceName } / whitelist * @ param name [ required ] Custom name for your Whitelisted IP * @ param sftp [ required ] Authorize this IP to access sftp port * @ param ip [ required ] The IP t...
String qPath = "/hosting/privateDatabase/{serviceName}/whitelist" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "ip" , ip ) ; addBody ( o , "name" , name ) ; addBody ( o , "service" , service ) ; addBody ( o , "sftp" , sftp ) ; St...
public class TaskManagerTabPanel { /** * < / editor - fold > */ private void jButtonSaveConfigActionPerformed ( java . awt . event . ActionEvent evt ) { } }
String path = "" ; BaseFileChooser propDir = new BaseFileChooser ( ) ; int selection = propDir . showSaveDialog ( this ) ; if ( selection == JFileChooser . APPROVE_OPTION ) { path = propDir . getSelectedFile ( ) . getAbsolutePath ( ) ; SaveConfig ( path ) ; }
public class CopticDate { /** * Obtains a { @ code CopticDate } from a temporal object . * This obtains a date in the Coptic calendar system based on the specified temporal . * A { @ code TemporalAccessor } represents an arbitrary set of date and time information , * which this factory converts to an instance of ...
if ( temporal instanceof CopticDate ) { return ( CopticDate ) temporal ; } return CopticDate . ofEpochDay ( temporal . getLong ( EPOCH_DAY ) ) ;
public class PDFView { /** * Load all the parts around the center of the screen , * taking into account X and Y offsets , zoom level , and * the current page displayed */ public void loadPages ( ) { } }
if ( optimalPageWidth == 0 || optimalPageHeight == 0 ) { return ; } // Cancel all current tasks renderingAsyncTask . removeAllTasks ( ) ; cacheManager . makeANewSet ( ) ; // Find current index in filtered user pages int index = currentPage ; if ( filteredUserPageIndexes != null ) { index = filteredUserPageIndexes [ cur...
public class CmsSitemapTreeNodeData { /** * Checks if this entry is marked as ' do not translate ' for the given locale . < p > * @ param locale the locale * @ return true if the ' do not translate ' mark for the given locale is set */ public boolean isMarkedNoTranslation ( Locale locale ) { } }
if ( m_noTranslation != null ) { return CmsLocaleManager . getLocales ( m_noTranslation ) . contains ( locale ) ; } return false ;
public class CmsSessionsTable { /** * Handles the table item clicks , including clicks on images inside of a table item . < p > * @ param event the click event * @ param itemId of the clicked row * @ param propertyId column id */ void onItemClick ( MouseEvents . ClickEvent event , Object itemId , Object propertyI...
if ( ! event . isCtrlKey ( ) && ! event . isShiftKey ( ) ) { changeValueIfNotMultiSelect ( itemId ) ; // don ' t interfere with multi - selection using control key if ( event . getButton ( ) . equals ( MouseButton . RIGHT ) || ( TableProperty . Icon . equals ( propertyId ) ) ) { m_menu . setEntries ( getMenuEntries ( )...
public class DcpControl { /** * Shorthand getter to check if buffer acknowledgements are enabled . */ public boolean bufferAckEnabled ( ) { } }
String bufSize = get ( Names . CONNECTION_BUFFER_SIZE ) ; return bufSize != null && Integer . parseInt ( bufSize ) > 0 ;
public class Messages { /** * Loads Pippo internal messages & application messages and returns the merger . * @ return all messages */ private Map < String , Properties > loadRegisteredMessageResources ( ) { } }
Map < String , Properties > internalMessages = loadRegisteredMessageResources ( "pippo/pippo-messages%s.properties" ) ; Map < String , Properties > applicationMessages = loadRegisteredMessageResources ( "conf/messages%s.properties" ) ; Map < String , Properties > allMessages = new TreeMap < > ( ) ; Set < String > merge...
public class GraphInferenceGrpcClient { /** * This method sends inference request to the GraphServer instance , and returns result as array of INDArrays * @ param graphId id of the graph * @ param inputs graph inputs with their string ides * @ return */ public INDArray [ ] output ( long graphId , Pair < String , ...
val operands = new Operands ( ) ; for ( val in : inputs ) operands . addArgument ( in . getFirst ( ) , in . getSecond ( ) ) ; return output ( graphId , operands ) . asArray ( ) ;
public class JsApiHdrsImpl { /** * Get the value of the JMSDeliveryMode field from the message header . * Javadoc description supplied by JsJmsMessage interface . */ public final PersistenceType getJmsDeliveryMode ( ) { } }
if ( getHdr2 ( ) . getChoiceField ( JsHdr2Access . JMSDELIVERYMODE ) == JsHdr2Access . IS_JMSDELIVERYMODE_EMPTY ) { return getDerivedJmsDeliveryMode ( ) ; } else { Byte pType = ( Byte ) getHdr2 ( ) . getField ( JsHdr2Access . JMSDELIVERYMODE_DATA ) ; return PersistenceType . getPersistenceType ( pType ) ; }
public class PathUtils { /** * This method normalized paths by removing ' / / ' and redundant ' . . ' . * @ param file * is the path to be normalized . * @ return A normalized { @ link File } is returned . */ public static File normalizePath ( File file ) { } }
if ( file == null ) { return new File ( "" ) ; } String normalizedFile = file . getPath ( ) ; // remove all ' / / ' . . . String quotedSeparator = Pattern . quote ( File . separator ) ; String replacementSeparator = File . separator . equals ( "/" ) ? File . separator : File . separator + File . separator ; boolean isA...
public class GenericRepository { /** * Count the number of E instances . * @ param entity a sample entity whose non - null properties may be used as search hint * @ param sp carries additional search information * @ param attributes the list of attributes to the property * @ return the number of entities matchi...
return findPropertyCount ( entity , sp , newArrayList ( attributes ) ) ;
public class InternalXtextParser { /** * InternalXtext . g : 459:1 : entryRuleReferencedMetamodel returns [ EObject current = null ] : iv _ ruleReferencedMetamodel = ruleReferencedMetamodel EOF ; */ public final EObject entryRuleReferencedMetamodel ( ) throws RecognitionException { } }
EObject current = null ; EObject iv_ruleReferencedMetamodel = null ; try { // InternalXtext . g : 459:60 : ( iv _ ruleReferencedMetamodel = ruleReferencedMetamodel EOF ) // InternalXtext . g : 460:2 : iv _ ruleReferencedMetamodel = ruleReferencedMetamodel EOF { newCompositeNode ( grammarAccess . getReferencedMetamodelR...
public class StringUtils { /** * Replace the dots in the property with underscore and * transform to uppercase based on given flag . * @ param dottedProperty The property with dots , example - a . b . c * @ param uppercase To transform to uppercase string * @ return The converted value */ public static String c...
if ( dottedProperty == null ) { return dottedProperty ; } Optional < String > converted = Optional . of ( dottedProperty ) . map ( value -> value . replace ( '.' , '_' ) ) . map ( value -> uppercase ? value . toUpperCase ( ) : value ) ; return converted . get ( ) ;
public class ListPolicyVersionsResult { /** * A list of policy versions . * For more information about managed policy versions , see < a * href = " https : / / docs . aws . amazon . com / IAM / latest / UserGuide / policies - managed - versions . html " > Versioning for Managed * Policies < / a > in the < i > IAM...
if ( this . versions == null ) { setVersions ( new com . amazonaws . internal . SdkInternalList < PolicyVersion > ( versions . length ) ) ; } for ( PolicyVersion ele : versions ) { this . versions . add ( ele ) ; } return this ;
public class HttpClient { /** * Put file as ' application / octet - stream ' . * @ param url URL of service * @ param response response pre - populated with request to send . Response content and * statusCode will be filled . * @ param headers http headers to add * @ param file file containing binary data to ...
HttpPut methodPut = new HttpPut ( url ) ; HttpEntity multipart = buildBodyWithFile ( file ) ; methodPut . setEntity ( multipart ) ; getResponse ( url , response , methodPut , headers ) ;
public class AmazonIdentityManagementClient { /** * Adds a new client ID ( also known as audience ) to the list of client IDs already registered for the specified IAM * OpenID Connect ( OIDC ) provider resource . * This operation is idempotent ; it does not fail or return an error if you add an existing client ID t...
request = beforeClientExecution ( request ) ; return executeAddClientIDToOpenIDConnectProvider ( request ) ;
public class DomainCommandBuilder { /** * Adds a JVM arguments to the host controller ignoring { @ code null } values . * @ param args the arguments to add * @ return the builder */ public DomainCommandBuilder addHostControllerJavaOptions ( final String ... args ) { } }
if ( args != null ) { for ( String arg : args ) { addHostControllerJavaOption ( arg ) ; } } return this ;
public class ContentIdUtil { /** * Determines the content ID of a file : the path of the file relative to * the watched directory . If the watched directory is null , the content ID * is simply the name of the file . * If a prefix is being used , the prefix is added as the initial characters * in the contentId ...
String contentId = file . getName ( ) ; if ( null != watchDir ) { URI relativeFileURI = watchDir . toURI ( ) . relativize ( file . toURI ( ) ) ; contentId = relativeFileURI . getPath ( ) ; } if ( null != contentIdPrefix ) { contentId = contentIdPrefix + contentId ; } return contentId ;
public class ProvFactory { /** * A factory method to create an instance of an invalidation { @ link WasInvalidatedBy } * @ param id an optional identifier for a usage * @ param entity an identifier for the created < a href = " http : / / www . w3 . org / TR / prov - dm / # invalidation . entity " > entity < / a > ...
WasInvalidatedBy res = of . createWasInvalidatedBy ( ) ; res . setId ( id ) ; res . setEntity ( entity ) ; res . setActivity ( activity ) ; return res ;
public class JavaNames { /** * Appends { @ code tokens } to { @ code target } in CamelCase format . * @ param tokens parts of the word * @ param target string builder the word is appended to * @ param firstToLower if true , the first character will be in lowercase */ public static StringBuilder camelCase ( final ...
for ( String t : tokens ) { if ( firstToLower ) { firstToLower = false ; target . append ( t . toLowerCase ( ) ) ; } else { appendFirstToUpper ( target , t ) ; } } return target ;
public class WebLocatorAbstractBuilder { /** * < p > < b > Used for finding element process ( to generate xpath address ) < / b > < / p > * < p > Result Example : < / p > * < pre > * / / * [ @ placeholder = ' Search ' ] * < / pre > * @ param attribute eg . placeholder * @ param value eg . Search * @ param...
pathBuilder . setAttribute ( attribute , value , searchTypes ) ; return ( T ) this ;
public class ConcurrentRegistry { /** * Remove the given entry from the registry under the specified key , only if the value matches the one given . * @ param removeKey key of the entry to be removed . * @ param removeValue value of the entry to be removed . * @ return true = > if the value was removed ; false = ...
boolean removedInd = this . store . remove ( removeKey , removeValue ) ; if ( removedInd ) { this . notificationExecutor . fireRemoveNotification ( this . listeners . iterator ( ) , removeKey , removeValue ) ; } return removedInd ;
public class PodLocalImpl { /** * Create cluster pods using the configuration as a hint . Both the cluster * and cluster _ hub pods use this . */ private ServerPod [ ] buildClusterServers ( ClusterHeartbeat cluster , int serverCount ) { } }
ArrayList < ServerPod > serversPod = new ArrayList < > ( ) ; for ( ServerHeartbeat server : cluster . getServers ( ) ) { ServerPod serverPod = new ServerPod ( serversPod . size ( ) ) ; serversPod . add ( serverPod ) ; // XXX : need to manage seed servers // serverPod . setHintServerId ( server . getId ( ) ) ; } /* if (...
public class Types { /** * The element type of an array . */ public Type elemtype ( Type t ) { } }
switch ( t . getTag ( ) ) { case WILDCARD : return elemtype ( wildUpperBound ( t ) ) ; case ARRAY : t = t . unannotatedType ( ) ; return ( ( ArrayType ) t ) . elemtype ; case FORALL : return elemtype ( ( ( ForAll ) t ) . qtype ) ; case ERROR : return t ; default : return null ; }
public class ProxyConnection { /** * { @ inheritDoc } */ @ Override public void setTransactionIsolation ( int level ) throws SQLException { } }
delegate . setTransactionIsolation ( level ) ; transactionIsolation = level ; dirtyBits |= DIRTY_BIT_ISOLATION ;
public class Utils { /** * Return the timeout value to use , first checking the argument provided to the CLI invocation , * then an environment variable , then the default value . */ private static int parseTimeout ( final Namespace options , final String dest , final String envVarName , final int defaultValue ) { } ...
if ( options . getInt ( dest ) != null ) { return options . getInt ( dest ) ; } if ( System . getenv ( envVarName ) != null ) { // if this is not an integer then let it blow up return Integer . parseInt ( System . getenv ( envVarName ) ) ; } return defaultValue ;
public class CmsPermissionViewTable { /** * Makes item for table . < p > * @ param cms CmsObject * @ param entry ACE * @ param view permission table * @ param resPath parentResource ( or null ) * @ return VerticalLayout */ private VerticalLayout getLayoutFromEntry ( CmsObject cms , CmsAccessControlEntry entry...
VerticalLayout res = new VerticalLayout ( ) ; res . setSpacing ( false ) ; I_CmsPrincipal principal = null ; try { principal = CmsPrincipal . readPrincipalIncludingHistory ( cms , entry . getPrincipal ( ) ) ; } catch ( CmsException e ) { principal = new CmsGroup ( entry . getPrincipal ( ) , null , "" , "" , 0 ) ; } if ...
public class Row { /** * End key column index , the index after the final key . */ private int keyColumnEnd ( ) { } }
int offset = 0 ; for ( int i = 0 ; i < _columns . length ; i ++ ) { if ( offset == _keyStart + _keyLength ) { return i ; } offset += _columns [ i ] . length ( ) ; } if ( offset == _keyStart + _keyLength ) { return _columns . length ; } throw new IllegalStateException ( ) ;
public class TreeScanner { /** * Scan a single node . */ public R scan ( Tree node , P p ) { } }
return ( node == null ) ? null : node . accept ( this , p ) ;
public class ListManagementTermListsImpl { /** * Refreshes the index of the list with list Id equal to list ID passed . * @ param listId List Id of the image list . * @ param language Language of the terms . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable t...
if ( this . client . baseUrl ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.baseUrl() is required and cannot be null." ) ; } if ( listId == null ) { throw new IllegalArgumentException ( "Parameter listId is required and cannot be null." ) ; } if ( language == null ) { throw new IllegalArgum...
public class LogManager { /** * Returns a Logger with the specified name . * @ param fqcn The fully qualified class name of the class that this method is a member of . * @ param name The logger name . * @ return The Logger . */ protected static Logger getLogger ( final String fqcn , final String name ) { } }
return factory . getContext ( fqcn , null , null , false ) . getLogger ( name ) ;
public class CmsUserEditDialog { /** * Sets the password status for the user . < p > * @ param user CmsUser * @ param reset true or false */ private void setUserPasswordStatus ( CmsUser user , boolean reset ) { } }
if ( reset ) { user . setAdditionalInfo ( CmsUserSettings . ADDITIONAL_INFO_PASSWORD_RESET , "true" ) ; } else { user . deleteAdditionalInfo ( CmsUserSettings . ADDITIONAL_INFO_PASSWORD_RESET ) ; } CmsUserTable . USER_PASSWORD_STATUS . put ( user . getId ( ) , new Boolean ( reset ) ) ;
public class GCLINERGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . GCLINERG__XPOS : setXPOS ( XPOS_EDEFAULT ) ; return ; case AfplibPackage . GCLINERG__YPOS : setYPOS ( YPOS_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class MapDBContext { /** * This DB returned by this method gets deleted on JVM shutdown . * @ param name name of the DB file * @ return an offline instance of { @ link MapDBContext } */ public static DBContext offlineInstance ( String name ) { } }
DB db = DBMaker . fileDB ( name ) . fileMmapEnableIfSupported ( ) . closeOnJvmShutdown ( ) . cleanerHackEnable ( ) . transactionEnable ( ) . fileDeleteAfterClose ( ) . make ( ) ; return new MapDBContext ( db ) ;
public class DynamoDBExecutor { /** * May misused with toItem */ @ SafeVarargs public static Map < String , AttributeValue > asItem ( Object ... a ) { } }
if ( 0 != ( a . length % 2 ) ) { throw new IllegalArgumentException ( "The parameters must be the pairs of property name and value, or Map, or an entity class with getter/setter methods." ) ; } final Map < String , AttributeValue > item = new LinkedHashMap < > ( N . initHashCapacity ( a . length / 2 ) ) ; for ( int i =...
public class FaunusPipeline { /** * Emit the property value of an element . * @ param key the key identifying the property * @ param type the class of the property value ( so Hadoop can intelligently handle the result ) * @ return the extended FaunusPipeline */ public FaunusPipeline property ( final String key , ...
this . state . assertNotLocked ( ) ; this . state . assertNoProperty ( ) ; this . state . setProperty ( key , type ) ; return this ;
public class OperatingSystemVersion { /** * Gets the operatorType value for this OperatingSystemVersion . * @ return operatorType * The operator type . * < span class = " constraint ReadOnly " > This field is * read only and will be ignored when sent to the API . < / span > */ public com . google . api . ads . ad...
return operatorType ;
public class ThroughputInfo { /** * 对应size的数据统计 */ public Long getSize ( ) { } }
Long size = 0L ; if ( items . size ( ) != 0 ) { for ( ThroughputStat item : items ) { size += item . getSize ( ) ; } } return size ;
public class MapTileCache { /** * Just a helper method in order to parse all indices without concurrency side effects * @ since 6.0.0 */ private void populateSyncCachedTiles ( final MapTileList pList ) { } }
synchronized ( mCachedTiles ) { pList . ensureCapacity ( mCachedTiles . size ( ) ) ; pList . clear ( ) ; for ( final long index : mCachedTiles . keySet ( ) ) { pList . put ( index ) ; } }
public class Graph { /** * Performs union on the vertices and edges sets of the input graphs * removing duplicate vertices but maintaining duplicate edges . * @ param graph the graph to perform union with * @ return a new graph */ public Graph < K , VV , EV > union ( Graph < K , VV , EV > graph ) { } }
DataSet < Vertex < K , VV > > unionedVertices = graph . getVertices ( ) . union ( this . getVertices ( ) ) . name ( "Vertices" ) . distinct ( ) . name ( "Vertices" ) ; DataSet < Edge < K , EV > > unionedEdges = graph . getEdges ( ) . union ( this . getEdges ( ) ) . name ( "Edges" ) ; return new Graph < > ( unionedVerti...
public class CPDefinitionLinkPersistenceImpl { /** * Returns the last cp definition link in the ordered set where uuid = & # 63 ; . * @ param uuid the uuid * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching cp definition link * @ t...
CPDefinitionLink cpDefinitionLink = fetchByUuid_Last ( uuid , orderByComparator ) ; if ( cpDefinitionLink != null ) { return cpDefinitionLink ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; msg . append ( uuid ) ; msg . append ( "}" ) ; throw new ...
public class TypeLord { /** * parameterized type for Base < T > . */ private static IType findActualDeclaringType ( IType ownersType , IType declaringType ) { } }
if ( ownersType == null ) { return null ; } if ( declaringType . isParameterizedType ( ) && ! declaringType . isGenericType ( ) ) { return declaringType ; } if ( ownersType == declaringType ) { return declaringType ; } if ( ownersType . getGenericType ( ) == declaringType ) { return ownersType ; } IType actualDeclaring...
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getGSCA ( ) { } }
if ( gscaEClass == null ) { gscaEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 466 ) ; } return gscaEClass ;
public class ServerOperations { /** * Creates an operation to list the deployments . * @ return the operation */ public static ModelNode createListDeploymentsOperation ( ) { } }
final ModelNode op = createOperation ( READ_CHILDREN_NAMES ) ; op . get ( CHILD_TYPE ) . set ( DEPLOYMENT ) ; return op ;
public class SMailConventionReceptionist { @ Override public void accept ( Postcard postcard ) { } }
readyPostcardFirst ( postcard ) ; checkPostcardFirst ( postcard ) ; if ( postcard . isForcedlyDirect ( ) ) { // should ignore body file assertPlainBodyExistsForDirectBody ( postcard ) ; postcard . getBodyFile ( ) . ifPresent ( bodyFile -> { // but wants logging officeManagedLogging ( postcard , bodyFile , prepareReceiv...
public class FilteredIndexIterator { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . SIMPIterator # finished ( ) */ public void finished ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "finished" ) ; cursor . finished ( ) ; cursor = null ; synchronized ( this ) { filter = null ; index = null ; next = null ; removable = null ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibT...
public class EmbeddedElastic { /** * Index documents * @ param indexName target index * @ param indexType target index type * @ param idJsonMap map where keys are documents ids and values are documents represented as JSON */ public void index ( String indexName , String indexType , Map < CharSequence , CharSequen...
index ( idJsonMap . entrySet ( ) . stream ( ) . map ( entry -> new IndexRequest . IndexRequestBuilder ( indexName , indexType , entry . getValue ( ) . toString ( ) ) . withId ( entry . getKey ( ) . toString ( ) ) . build ( ) ) . collect ( toList ( ) ) ) ;
public class AbstractPrintQuery { /** * Add an attribute to the PrintQuery . It is used to get editable values * from the eFaps DataBase . * @ param _ attributes Attribute to add * @ return this PrintQuery * @ throws EFapsException on error */ public AbstractPrintQuery addAttribute ( final CIAttribute ... _attr...
if ( isMarked4execute ( ) ) { for ( final CIAttribute attr : _attributes ) { addAttribute ( attr . name ) ; } } return this ;
public class HCExtHelper { /** * Convert the passed text to a list of & lt ; div & gt ; elements . Each \ n is used * to split the text into separate lines . \ r characters are removed from the * string ! Empty lines are preserved except for the last line . E . g . * < code > Hello \ nworld < / code > results in ...
forEachLine ( sText , ( sLine , bLast ) -> aTarget . accept ( new HCDiv ( ) . addChild ( sLine ) ) ) ;
public class IOUtil { /** * close inputstream without a Exception * @ param is */ public static void closeEL ( InputStream is ) { } }
try { if ( is != null ) is . close ( ) ; } // catch ( AlwaysThrow at ) { throw at ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t ) ; }
public class Functions { /** * Generate a message integrity check for a given received message . * @ param context GSSContext for which a connection has been established to the remote peer * @ param prop the MessageProp used for exchanging messages * @ param message the bytes of the received message * @ return ...
try { // Ensure the default Quality - of - Protection is applied . prop . setQOP ( 0 ) ; byte [ ] initialToken = context . getMIC ( message , 0 , message . length , prop ) ; return getTokenWithLengthPrefix ( initialToken ) ; } catch ( GSSException ex ) { throw new RuntimeException ( "Exception generating MIC for messag...
public class ModifyVpcEndpointRequest { /** * ( Interface endpoint ) One or more subnets IDs in which to remove the endpoint . * @ return ( Interface endpoint ) One or more subnets IDs in which to remove the endpoint . */ public java . util . List < String > getRemoveSubnetIds ( ) { } }
if ( removeSubnetIds == null ) { removeSubnetIds = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return removeSubnetIds ;
public class CFFFontSubset { /** * Function Copies the header from the original fileto the output list */ protected void CopyHeader ( ) { } }
seek ( 0 ) ; @ SuppressWarnings ( "unused" ) int major = getCard8 ( ) ; @ SuppressWarnings ( "unused" ) int minor = getCard8 ( ) ; int hdrSize = getCard8 ( ) ; @ SuppressWarnings ( "unused" ) int offSize = getCard8 ( ) ; nextIndexOffset = hdrSize ; OutputList . addLast ( new RangeItem ( buf , 0 , hdrSize ) ) ;
public class ZoneMeta { /** * Returns an immutable set of system time zone IDs . * Etc / Unknown is excluded . * @ return An immutable set of system time zone IDs . */ private static synchronized Set < String > getSystemZIDs ( ) { } }
Set < String > systemZones = null ; if ( REF_SYSTEM_ZONES != null ) { systemZones = REF_SYSTEM_ZONES . get ( ) ; } if ( systemZones == null ) { Set < String > systemIDs = new TreeSet < String > ( ) ; String [ ] allIDs = getZoneIDs ( ) ; for ( String id : allIDs ) { // exclude Etc / Unknown if ( id . equals ( TimeZone ....
public class GetApplicationRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetApplicationRequest getApplicationRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getApplicationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getApplicationRequest . getApplicationId ( ) , APPLICATIONID_BINDING ) ; protocolMarshaller . marshall ( getApplicationRequest . getSemanticVersion ( ) , SEMANTICV...
public class CsvClassifierMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CsvClassifier csvClassifier , ProtocolMarshaller protocolMarshaller ) { } }
if ( csvClassifier == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( csvClassifier . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( csvClassifier . getCreationTime ( ) , CREATIONTIME_BINDING ) ; protocolMarshaller . marshall...
public class CacheStatistics { /** * Returns the ratio of cache loading attempts which threw exceptions . This is defined as { @ code * loadExceptionCount / ( loadSuccessCount + loadExceptionCount ) } , or { @ code 0.0 } when { @ code * loadSuccessCount + loadExceptionCount = = 0 } . */ @ Override public double get...
long totalLoadCount = loadSuccessCount . get ( ) + loadExceptionCount . get ( ) ; return ( totalLoadCount == 0 ) ? 0.0 : ( double ) loadExceptionCount . get ( ) / totalLoadCount ;
public class DataFrames { /** * Standard deviation for a column * @ param dataFrame the dataframe to * get the column from * @ param columnName the name of the column to get the standard * deviation for * @ return the column that represents the standard deviation */ public static Column var ( DataRowsFacade d...
return dataFrame . get ( ) . groupBy ( columnName ) . agg ( functions . variance ( columnName ) ) . col ( columnName ) ;
public class ScanlineFiller { /** * Fills clipped area starting at xx , yy . Area must be surrounded with * replacement ( or clip ) * @ param xx * @ param yy * @ param clip * @ param target * @ param replacement */ public void floodFill ( int xx , int yy , Rectangle clip , IntPredicate target , int replacem...
floodFill ( xx , yy , clip . x , clip . y , clip . x + clip . width , clip . y + clip . height , target , replacement ) ;
public class HOSECodeGenerator { /** * Generates the string code for a given sphere . * @ param sphereNodes A vector of TreeNodes for which a string code is to be generated * @ return The SphereCode value * @ exception org . openscience . cdk . exception . CDKException Thrown if something goes wrong */ private St...
if ( sphereNodes == null || sphereNodes . size ( ) < 1 ) { return sphereDelimiters [ sphere - 1 ] ; } TreeNode treeNode = null ; StringBuffer code = new StringBuffer ( ) ; /* * append the tree node code to the HOSECode in their now determined * order , using commas to separate nodes from different branches */ IAtom b...
public class InputEvent { @ Nonnull public static InputEvent key ( @ Nonnull InputKeyEvent key ) { } }
InputEvent self = new InputEvent ( ) ; self . type = Discriminator . key ; self . key = key ; return self ;
public class CreateUserPoolRequest { /** * Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up . * @ param usernameAttributes * Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up . * @ return Returns a reference t...
java . util . ArrayList < String > usernameAttributesCopy = new java . util . ArrayList < String > ( usernameAttributes . length ) ; for ( UsernameAttributeType value : usernameAttributes ) { usernameAttributesCopy . add ( value . toString ( ) ) ; } if ( getUsernameAttributes ( ) == null ) { setUsernameAttributes ( use...
public class AbstractCasWebflowConfigurer { /** * Create expression expression . * @ param expression the expression * @ param expectedType the expected type * @ return the expression */ public Expression createExpression ( final String expression , final Class expectedType ) { } }
val parserContext = new FluentParserContext ( ) . expectResult ( expectedType ) ; return getSpringExpressionParser ( ) . parseExpression ( expression , parserContext ) ;
public class TLVElement { /** * Creates TLV element with { @ link Long } content . * TLV element nonCritical and forwarded flags are set to false . * @ param type TLV element type . * @ param value value to be the content of the TLV element . * @ return { @ link TLVElement } * @ throws TLVParserException */ p...
TLVElement element = create ( type ) ; element . setLongContent ( value ) ; return element ;
public class CommerceTierPriceEntryPersistenceImpl { /** * Returns a range of all the commerce tier price entries where groupId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , ...
return findByGroupId ( groupId , start , end , null ) ;
public class Windowing { /** * Adapts an iterable to an iterator showing a sliding window of the * contained elements . e . g : iterable : [ 1,2,3 ] windowSize : 2 - > [ [ 1,2 ] , * [ 2,3 ] ] * @ param < T > the iterator element type * @ param windowSize the window size * @ param iterable the iterable to be a...
dbc . precondition ( iterable != null , "cannot create a window iterator from a null iterable" ) ; final Supplier < List < T > > factory = Compositions . compose ( new Vary < ArrayList < T > , List < T > > ( ) , new ArrayListFactory < T > ( ) ) ; return new PreciseWindowIterator < List < T > , T > ( iterable . iterator...
public class MavenResolverSystemBaseImpl { /** * { @ inheritDoc } * @ see org . jboss . shrinkwrap . resolver . api . ResolveStage # resolve ( java . lang . String [ ] ) */ @ Override public STRATEGYSTAGETYPE resolve ( String ... coordinates ) throws IllegalArgumentException , ResolutionException { } }
return delegate . resolve ( coordinates ) ;
public class XGMMLExporter { /** * Export KAM to XGMML format using the KAM API . * @ param kam { @ link Kam } the kam to export to XGMML * @ param kAMStore { @ link KAMStore } the kam store to read kam details from * @ param outputPath { @ link String } the output path to write XGMML file to , * which can be n...
if ( nulls ( kam , kAMStore , outputPath ) ) { throw new InvalidArgument ( "argument(s) were null" ) ; } // Set up a writer to write the XGMML PrintWriter writer = new PrintWriter ( outputPath ) ; // Start to process the Kam // Write xgmml < graph > element header XGMMLUtility . writeStart ( kam . getKamInfo ( ) . getN...
public class NDArrayMessage { /** * Prepare a whole array update * which includes the default dimensions * for indicating updating * the whole array ( a 1 length int array with - 1 as its only element ) * - 1 representing the dimension * @ param arr * @ return */ public static NDArrayMessage wholeArrayUpdat...
return NDArrayMessage . builder ( ) . arr ( arr ) . dimensions ( WHOLE_ARRAY_UPDATE ) . index ( WHOLE_ARRAY_INDEX ) . sent ( getCurrentTimeUtc ( ) ) . build ( ) ;
public class Table { /** * Returns a table consisting of randomly selected records from this table . The sample size is based on the * given proportion * @ param proportion The proportion to go in the sample */ public Table sampleX ( double proportion ) { } }
Preconditions . checkArgument ( proportion <= 1 && proportion >= 0 , "The sample proportion must be between 0 and 1" ) ; int tableSize = ( int ) Math . round ( rowCount ( ) * proportion ) ; return where ( selectNRowsAtRandom ( tableSize , rowCount ( ) ) ) ;
public class InjectionPointFactory { /** * Notifies CDI extension of a given { @ link InjectionPoint } . */ protected < T , X > FieldInjectionPointAttributes < T , X > processInjectionPoint ( FieldInjectionPointAttributes < T , X > injectionPointAttributes , Class < ? > declaringComponentClass , BeanManagerImpl manager...
return manager . getContainerLifecycleEvents ( ) . fireProcessInjectionPoint ( injectionPointAttributes , declaringComponentClass , manager ) ;
public class JdbcFlowTriggerInstanceLoaderImpl { /** * Retrieve recently finished trigger instances , but flow trigger properties are not populated * into the returned trigger instances for efficiency . Flow trigger properties will be * retrieved only on request time . */ @ Override public Collection < TriggerInsta...
final String query = String . format ( SELECT_RECENTLY_FINISHED , limit ) ; try { return this . dbOperator . query ( query , new TriggerInstanceHandler ( SORT_MODE . SORT_ON_START_TIME_ASC ) ) ; } catch ( final SQLException ex ) { handleSQLException ( ex ) ; } return Collections . emptyList ( ) ;
public class DataStore { /** * Add a data row to the batch at a particular timestamp . * This method will throw a ` MismatchedLengthException ` if the length of ` columns ` and ` values ` * are not the same . * See { @ link # add ( long , Map ) } for more information . * @ param timestamp Timestamp for all data...
add ( timestamp , Arrays . asList ( columns ) , Arrays . asList ( values ) ) ;
public class JNRPE { /** * Starts a new thread that listen for requests . The method is < b > not * blocking < / b > * @ param address * The address to bind to * @ param port * The listening port * @ param useSSL * < code > true < / code > if an SSL socket must be created . * @ throws UnknownHostExcepti...
// Bind and start to accept incoming connections . ChannelFuture cf = getServerBootstrap ( useSSL ) . bind ( address , port ) ; cf . addListener ( new ChannelFutureListener ( ) { public void operationComplete ( final ChannelFuture future ) throws Exception { if ( future . isSuccess ( ) ) { context . getEventBus ( ) . p...
public class NatsBench { /** * Runs the benchmark . * @ throws Exception if an exception occurs */ public void start ( ) throws Exception { } }
installShutdownHook ( ) ; System . out . println ( ) ; System . out . printf ( "Starting benchmark(s) [msgs=%d, msgsize=%d, pubs=%d, subs=%d]\n" , numMsgs , size , numPubs , numSubs ) ; System . out . printf ( "Current memory usage is %s / %s / %s free/total/max\n" , Utils . humanBytes ( Runtime . getRuntime ( ) . free...
public class ImagePipeline { /** * Returns a DataSource supplier that will on get submit the request for execution and return a * DataSource representing the pending results of the task . * @ param imageRequest the request to submit ( what to execute ) . * @ param callerContext the caller context of the caller of...
return new Supplier < DataSource < CloseableReference < CloseableImage > > > ( ) { @ Override public DataSource < CloseableReference < CloseableImage > > get ( ) { return fetchDecodedImage ( imageRequest , callerContext , requestLevel ) ; } @ Override public String toString ( ) { return Objects . toStringHelper ( this ...
public class DataModelConverters { /** * Converts { @ link IDataSet } to the new { @ link IDataModel } . */ static IDataModel toDataModel ( final IDataSet dataSet ) { } }
DataModel dataModel = new DataModel ( dataSet . getName ( ) ) ; for ( IDsRow dsRow : dataSet ) { DmRow dmRow = new DmRow ( dsRow . index ( ) ) ; for ( IDsCell dsCell : dsRow ) { DmCell dmCell = new DmCell ( ) ; dmCell . setValue ( Optional . of ( dsCell . getValue ( ) ) ) ; dmCell . setAddress ( new CellAddress ( dataM...
public class JDBCInputFormat { /** * Connects to the source database and executes the query . * @ param ignored * @ throws IOException */ @ Override public void open ( InputSplit ignored ) throws IOException { } }
try { establishConnection ( ) ; statement = dbConn . createStatement ( ResultSet . TYPE_SCROLL_INSENSITIVE , ResultSet . CONCUR_READ_ONLY ) ; resultSet = statement . executeQuery ( query ) ; } catch ( SQLException se ) { close ( ) ; throw new IllegalArgumentException ( "open() failed." + se . getMessage ( ) , se ) ; } ...
public class CmsXmlContentPropertyHelper { /** * Converts a property value given as a string between server format and client format . < p > * @ param cms the current CMS context * @ param propValue the property value to convert * @ param type the type of the property * @ param toClient if true , convert to cli...
if ( propValue == null ) { return null ; } if ( toClient ) { return CmsXmlContentPropertyHelper . getPropValuePaths ( cms , type , propValue ) ; } else { return CmsXmlContentPropertyHelper . getPropValueIds ( cms , type , propValue ) ; }
public class DeviceDataDAODefaultImpl { @ Deprecated public void insert_u ( final DeviceData deviceData , final short [ ] argin ) { } }
DevVarUShortArrayHelper . insert ( deviceData . getAny ( ) , argin ) ;
public class SecureASTCustomizer { /** * An alternative way of setting { @ link # setReceiversWhiteList ( java . util . List ) receiver classes } . * @ param receiversWhitelist a list of classes . */ public void setReceiversClassesWhiteList ( final List < Class > receiversWhitelist ) { } }
List < String > values = new LinkedList < String > ( ) ; for ( Class aClass : receiversWhitelist ) { values . add ( aClass . getName ( ) ) ; } setReceiversWhiteList ( values ) ;
public class CommonOps_DDF4 { /** * Returns the value of the element in the matrix that has the minimum value . < br > * < br > * Min { a < sub > ij < / sub > } for all i and j < br > * @ param a A matrix . Not modified . * @ return The value of element in the matrix with the minimum value . */ public static do...
double min = a . a11 ; if ( a . a12 < min ) min = a . a12 ; if ( a . a13 < min ) min = a . a13 ; if ( a . a14 < min ) min = a . a14 ; if ( a . a21 < min ) min = a . a21 ; if ( a . a22 < min ) min = a . a22 ; if ( a . a23 < min ) min = a . a23 ; if ( a . a24 < min ) min = a . a24 ; if ( a . a31 < min ) min = a . a31 ; i...