signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class JmsMessageImpl { /** * This static method is a factory for producing Message objects from * JsJmsMessage objects . * It is called by JmsSharedUtilsImpl . inboundMessagePath ( . . . ) * Note that this method cannot be easily moved to the shared utils * class because it access private state of the Jm...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "inboundJmsInstance" , new Object [ ] { newMsg , newSess , passThruProps } ) ; // This is where the mapping of MFP components to JMS components takes // place . The list of mappings should increase as we support more method ...
public class RouteSelector { /** * Visible for testing */ static String getHostString ( InetSocketAddress socketAddress ) { } }
InetAddress address = socketAddress . getAddress ( ) ; if ( address == null ) { // The InetSocketAddress was specified with a string ( either a numeric IP or a host name ) . If // it is a name , all IPs for that name should be tried . If it is an IP address , only that IP // address should be tried . return socketAddre...
public class ScannerSupplier { /** * Returns a { @ link ScannerSupplier } with a specific list of { @ link BugChecker } classes . */ @ SafeVarargs public static ScannerSupplier fromBugCheckerClasses ( Class < ? extends BugChecker > ... checkerClasses ) { } }
return fromBugCheckerClasses ( Arrays . asList ( checkerClasses ) ) ;
public class FlowControllerFactory { /** * Create a { @ link SharedFlowController } of the given type . * @ param context a { @ link RequestContext } object which contains the current request and response . * @ param sharedFlowClassName the type name of the desired SharedFlowController . * @ return the newly - cr...
Class sharedFlowClass = getFlowControllerClass ( sharedFlowClassName ) ; return createSharedFlow ( context , sharedFlowClass ) ;
public class Tools { /** * 根据MAP的VALUE进行排序 , 升序 * @ param map * @ return */ public static < K > List < Map . Entry < K , Integer > > sortByIntegerValue ( Map < K , Integer > map ) { } }
List < Map . Entry < K , Integer > > orderList = new ArrayList < > ( map . entrySet ( ) ) ; Collections . sort ( orderList , new Comparator < Map . Entry < K , Integer > > ( ) { @ Override public int compare ( Map . Entry < K , Integer > o1 , Map . Entry < K , Integer > o2 ) { return ( o1 . getValue ( ) - o2 . getValue...
public class JGTProcessingRegion { /** * Transform the current region into a { @ link GridGeometry2D } . * @ param crs the { @ link CoordinateReferenceSystem } to apply . * @ return the gridgeometry . */ public GridGeometry2D getGridGeometry ( CoordinateReferenceSystem crs ) { } }
GridGeometry2D gridGeometry = CoverageUtilities . gridGeometryFromRegionParams ( getRegionParams ( ) , crs ) ; return gridGeometry ;
public class Call { /** * Executes a method on the target object which returns Long . Parameters must match * those of the method . * @ param methodName the name of the method * @ param optionalParameters the ( optional ) parameters of the method . * @ return the result of the method execution */ public static ...
return new Call < Object , Long > ( Types . LONG , methodName , VarArgsUtil . asOptionalObjectArray ( Object . class , optionalParameters ) ) ;
public class Sets { /** * Create a unmodifiable set with contents . * @ param contents The contents of the set . * @ return A unmodifiable set containing contents . */ public static < T > Set < T > newUnmodifiableSet ( Collection < T > contents ) { } }
if ( isEmpty ( contents ) ) return Collections . emptySet ( ) ; if ( contents . size ( ) == 1 ) return Collections . singleton ( contents . iterator ( ) . next ( ) ) ; return Collections . unmodifiableSet ( dup ( contents ) ) ;
public class TmdbParameters { /** * Add an array parameter to the collection * @ param key Parameter to add * @ param value The array value to use ( will be converted into a comma separated list ) */ public void add ( final Param key , final String [ ] value ) { } }
if ( value != null && value . length > 0 ) { parameters . put ( key , toList ( value ) ) ; }
public class JDK14Logger { /** * from interface Logger . Factory */ public Logger getLogger ( String name ) { } }
return new Impl ( java . util . logging . Logger . getLogger ( name ) ) ;
public class WebDriverHelper { /** * Returns the first selected value from a drop down list . * @ param by * the method of identifying the element * @ return the first selected option from a drop - down */ public String getSelectedValue ( final By by ) { } }
Select select = new Select ( driver . findElement ( by ) ) ; String defaultSelectedValue = select . getFirstSelectedOption ( ) . getText ( ) ; return defaultSelectedValue ;
public class PusherInternal { /** * in CBL _ Pusher . m * - ( CBLMultipartWriter * ) multipartWriterForRevision : ( CBL _ Revision * ) rev */ @ InterfaceAudience . Private private boolean uploadMultipartRevision ( final RevisionInternal revision ) { } }
Map < String , Object > body = revision . getProperties ( ) ; Map < String , Object > attachments = ( Map < String , Object > ) body . get ( "_attachments" ) ; boolean attachmentsFollow = false ; for ( String attachmentKey : attachments . keySet ( ) ) { Map < String , Object > attachment = ( Map < String , Object > ) a...
public class PathFinder { /** * Gets the absolute path . * @ param file * the file * @ param removeLastChar * the remove last char * @ return the absolute path */ public static String getAbsolutePath ( final File file , final boolean removeLastChar ) { } }
String absolutePath = file . getAbsolutePath ( ) ; if ( removeLastChar ) { absolutePath = absolutePath . substring ( 0 , absolutePath . length ( ) - 1 ) ; } return absolutePath ;
public class configstatus { /** * Use this API to fetch filtered set of configstatus resources . * filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */ public static configstatus [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
configstatus obj = new configstatus ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; configstatus [ ] response = ( configstatus [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class AsteriskQueueImpl { /** * Notifies all registered listener that a queue member changes its state . * @ param member the changed member . */ void fireMemberStateChanged ( AsteriskQueueMemberImpl member ) { } }
synchronized ( listeners ) { for ( AsteriskQueueListener listener : listeners ) { try { listener . onMemberStateChange ( member ) ; } catch ( Exception e ) { logger . warn ( "Exception in onMemberStateChange()" , e ) ; } } }
public class SerdesManagerImpl { /** * Register a serializer / deserializer of the given type . * @ param serdes The serializer / deserializer of T . * @ param < T > The type of the object to be serialized / deserialized . * @ return The { @ link HandlerRegistration } object , capable of cancelling this HandlerRe...
final HandlerRegistration desReg = register ( ( Deserializer < T > ) serdes ) ; final HandlerRegistration serReg = register ( ( Serializer < T > ) serdes ) ; return new HandlerRegistration ( ) { @ Override public void removeHandler ( ) { desReg . removeHandler ( ) ; serReg . removeHandler ( ) ; } } ;
public class TempByteHolder { /** * Writes efficiently part of the content to output stream . * @ param os OutputStream to write to * @ param start _ offset Offset of data fragment to be written * @ param length Length of data fragment to be written * @ throws IOException */ public void writeTo ( java . io . Ou...
int towrite = min ( length , _write_pos - start_offset ) ; int writeoff = start_offset ; if ( towrite > 0 ) { while ( towrite >= _window_size ) { moveWindow ( writeoff ) ; os . write ( _memory_buffer , 0 , _window_size ) ; towrite -= _window_size ; writeoff += _window_size ; } if ( towrite > 0 ) { moveWindow ( writeoff...
public class BytesUtils { /** * Method used to convert byte array to int * @ param byteArray * byte array to convert * @ param startPos * start position in array in the * @ param length * length of data * @ return int value of byte array */ public static int byteArrayToInt ( final byte [ ] byteArray , fin...
if ( byteArray == null ) { throw new IllegalArgumentException ( "Parameter 'byteArray' cannot be null" ) ; } if ( length <= 0 || length > 4 ) { throw new IllegalArgumentException ( "Length must be between 1 and 4. Length = " + length ) ; } if ( startPos < 0 || byteArray . length < startPos + length ) { throw new Illega...
public class CompoundReentrantTypeResolver { /** * / * @ Nullable */ @ Override public JvmIdentifiableElement getLinkedFeature ( /* @ Nullable */ XAbstractFeatureCall featureCall ) { } }
if ( featureCall == null ) return null ; IResolvedTypes delegate = getDelegate ( featureCall ) ; return delegate . getLinkedFeature ( featureCall ) ;
public class HttpChannelConfig { /** * Method to handle parsing all of the persistence related configuration * values . * @ param props */ private void parsePersistence ( Map < Object , Object > props ) { } }
parseKeepAliveEnabled ( props ) ; if ( isKeepAliveEnabled ( ) ) { parseMaxPersist ( props ) ; }
public class AbstractDelete { /** * Check access for all Instances . If one does not have access an error will be thrown . * @ throws EFapsException the eFaps exception */ protected void checkAccess ( ) throws EFapsException { } }
for ( final Instance instance : getInstances ( ) ) { if ( ! instance . getType ( ) . hasAccess ( instance , AccessTypeEnums . DELETE . getAccessType ( ) , null ) ) { LOG . error ( "Delete not permitted for Person: {} on Instance: {}" , Context . getThreadContext ( ) . getPerson ( ) , instance ) ; throw new EFapsExcepti...
public class ZooKeeper { /** * Close this client object . Once the client is closed , its session becomes * invalid . All the ephemeral nodes in the ZooKeeper server associated with * the session will be removed . The watches left on those nodes ( and on * their parents ) will be triggered . * @ throws Interrup...
if ( ! state . isAlive ( ) ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Close called on already closed client" ) ; } return ; } if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Closing session: 0x" + Long . toHexString ( getSessionId ( ) ) ) ; } try { cnxn . close ( ) ; } catch ( IOException e ) { if ( LOG . is...
public class AmazonTranscribeClient { /** * Returns a list of vocabularies that match the specified criteria . If no criteria are specified , returns the * entire list of vocabularies . * @ param listVocabulariesRequest * @ return Result of the ListVocabularies operation returned by the service . * @ throws Bad...
request = beforeClientExecution ( request ) ; return executeListVocabularies ( request ) ;
public class ByteCodeClassLoader { /** * Adds a class definition for this ClassLoader . When the class as given in the definition is * loaded for the first time , the byte code inside the definition will be used to load the class . * @ param classDef The class definition * @ param typeClass An optional class that...
bytecodes . put ( classDef . getClassName ( ) , classDef . getBytecode ( ) ) ; if ( typeClass != null ) { typeClasses . put ( typeClass . getName ( ) , typeClass ) ; } return this ;
public class MapCache { /** * Create or update a new rootNode child */ @ Override public void put ( String key , JSONObject value ) throws KeeperException , InterruptedException { } }
try { m_zk . create ( ZKUtil . joinZKPath ( m_rootNode , key ) , value . toString ( ) . getBytes ( Constants . UTF8ENCODING ) , Ids . OPEN_ACL_UNSAFE , CreateMode . PERSISTENT ) ; } catch ( KeeperException . NodeExistsException e ) { m_zk . setData ( ZKUtil . joinZKPath ( m_rootNode , key ) , value . toString ( ) . get...
public class Validate { /** * Checks that the specified String is not null or empty and represents a readable file , throws exception if it is empty or * null and does not represent a path to a file . * @ param path The path to check * @ param message The exception message * @ throws IllegalArgumentException Th...
notNull ( path , message ) ; if ( ! isReadable ( path ) ) { throw new IllegalArgumentException ( message ) ; }
public class TypeUtils { /** * Append { @ code types } to { @ code buf } with separator { @ code sep } . * @ param buf destination * @ param sep separator * @ param types to append * @ return { @ code buf } * @ since 3.2 */ private static < T > StringBuilder appendAllTo ( final StringBuilder buf , final Strin...
Assert . requireNonNullEntries ( types , "types" ) ; Assert . requireNotEmpty ( types , "types" ) ; if ( types . length > 0 ) { buf . append ( toString ( types [ 0 ] ) ) ; for ( int i = 1 ; i < types . length ; i ++ ) { buf . append ( sep ) . append ( toString ( types [ i ] ) ) ; } } return buf ;
public class ImportHelpers { /** * Finds a specific import from the path of the instance that exports it . * @ param imports a collection of imports ( that can be null ) * @ param exportingInstancePath the path of the exporting instance * @ return an import , or null if none was found */ public static Import find...
Import result = null ; if ( imports != null && exportingInstancePath != null ) { for ( Import imp : imports ) { if ( exportingInstancePath . equals ( imp . getInstancePath ( ) ) ) { result = imp ; break ; } } } return result ;
public class MethodAttribUtils { /** * This utility method compares a method on the bean ' s remote * interface with a method on the bean and returns true iff they * are equal for the purpose of determining if the control * descriptor associated with the bean method applies to the * remote interface method . Eq...
if ( ( remoteMethod == null ) || ( beanMethod == null ) ) { return false ; } // Compare method names if ( ! remoteMethod . getName ( ) . equals ( beanMethod . getName ( ) ) ) { return false ; } // Compare parameter types Class < ? > remoteMethodParamTypes [ ] = remoteMethod . getParameterTypes ( ) ; Class < ? > beanMet...
public class Utils { /** * Expands a template , replacing each { { param } } by the corresponding value . * Eg . " My name is { { name } } " will result in " My name is Bond " , provided that " params " contains " name = Bond " . * @ param s the template to expand * @ param params the parameters to be expanded in...
String result ; if ( params == null || params . size ( ) < 1 ) { result = s ; } else { StringBuffer sb = new StringBuffer ( ) ; Pattern pattern = Pattern . compile ( "\\{\\{\\s*\\S+\\s*\\}\\}" ) ; Matcher m = pattern . matcher ( s ) ; while ( m . find ( ) ) { String raw = m . group ( ) ; String varName = m . group ( ) ...
public class HTODDynacache { /** * delTemplate ( ) * This removes the specified template and its ValueSet ( with all of its elements ) * from the disk . */ public int delTemplate ( String template ) { } }
int returnCode = NO_EXCEPTION ; if ( ! this . disableTemplatesSupport ) { if ( delayOffload ) { auxTemplateDependencyTable . removeDependency ( template ) ; } returnCode = delValueSet ( TEMPLATE_ID_DATA , template ) ; } return returnCode ;
public class SimpleDbEntityInformationSupport { /** * Creates a { @ link SimpleDbEntityInformation } for the given domain class . * @ param domainClass * must not be { @ literal null } . * @ return */ @ SuppressWarnings ( { } }
"rawtypes" , "unchecked" } ) public static < T > SimpleDbEntityInformation < T , ? > getMetadata ( Class < T > domainClass , String simpleDbDomain ) { Assert . notNull ( domainClass ) ; Assert . notNull ( simpleDbDomain ) ; return new SimpleDbMetamodelEntityInformation ( domainClass , simpleDbDomain ) ;
public class NodeDefinitionImpl { /** * { @ inheritDoc } */ public String [ ] getRequiredPrimaryTypeNames ( ) { } }
InternalQName [ ] requiredPrimaryTypes = nodeDefinitionData . getRequiredPrimaryTypes ( ) ; String [ ] result = new String [ requiredPrimaryTypes . length ] ; try { for ( int i = 0 ; i < requiredPrimaryTypes . length ; i ++ ) { result [ i ] = locationFactory . createJCRName ( requiredPrimaryTypes [ i ] ) . getAsString ...
public class CommonOps_DDRM { /** * Creates a rectangular matrix which is zero except along the diagonals . * @ param numRows Number of rows in the matrix . * @ param numCols NUmber of columns in the matrix . * @ return A matrix with diagonal elements equal to one . */ public static DMatrixRMaj identity ( int num...
DMatrixRMaj ret = new DMatrixRMaj ( numRows , numCols ) ; int small = numRows < numCols ? numRows : numCols ; for ( int i = 0 ; i < small ; i ++ ) { ret . set ( i , i , 1.0 ) ; } return ret ;
public class BasicOpenDialogCommand { /** * { @ inheritDoc } */ @ Override public void openWarningDialog ( ) { } }
final Alert alert = new Alert ( AlertType . WARNING ) ; alert . setTitle ( bean . getTitle ( ) ) ; alert . setHeaderText ( bean . getHeader ( ) ) ; alert . setContentText ( bean . getMessage ( ) ) ; alert . showAndWait ( ) ;
public class TabularResult { /** * Create a tabular result set from a header definition and an ordered list of rows . * @ param headerDefinition the definition of the header row , not null * @ param rows a list of rows , not null * @ return the { @ code TabularResult } instance */ public static TabularResult of (...
ArgumentChecker . notNull ( headerDefinition , "headerDefinition" ) ; ArgumentChecker . notNull ( rows , "rows" ) ; return new TabularResult ( headerDefinition , rows ) ;
public class CommandFactory { /** * Iterate and insert each of the elements of the Collection . * @ param objects * The objects to insert * @ param outIdentifier * Identifier to lookup the returned objects * @ param returnObject * boolean to specify whether the inserted Collection is part of the ExecutionRe...
return getCommandFactoryProvider ( ) . newInsertElements ( objects , outIdentifier , returnObject , entryPoint ) ;
public class DbxClientV1 { /** * Upload file contents to Dropbox , getting contents from the given { @ link DbxStreamWriter } . * < pre > * DbxClientV1 dbxClient = . . . * < b > / / Create a file on Dropbox with 100 3 - digit random numbers , one per line . < / b > * final int numRandoms = 100; * int fileSize...
Uploader uploader = startUploadFile ( targetPath , writeMode , numBytes ) ; return finishUploadFile ( uploader , writer ) ;
public class Compiler { /** * Compile a ' boolean ( . . . ) ' operation . * @ param opPos The current position in the m _ opMap array . * @ return reference to { @ link org . apache . xpath . operations . Bool } instance . * @ throws TransformerException if a error occurs creating the Expression . */ protected Ex...
return compileUnary ( new org . apache . xpath . operations . Bool ( ) , opPos ) ;
public class JvmCompoundTypeReferenceImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case TypesPackage . JVM_COMPOUND_TYPE_REFERENCE__TYPE : setType ( ( JvmType ) newValue ) ; return ; case TypesPackage . JVM_COMPOUND_TYPE_REFERENCE__REFERENCES : getReferences ( ) . clear ( ) ; getReferences ( ) . addAll ( ( Collection < ? extends JvmTypeReference > ) newValue ) ; return ; } supe...
public class SecurityHelper { /** * Get the display name of the guest user in the specified locale . * @ param aDisplayLocale * The locale to be used . May not be < code > null < / code > . * @ return < code > null < / code > if no translation is present . */ @ Nullable public static String getGuestUserDisplayNam...
ValueEnforcer . notNull ( aDisplayLocale , "DisplayLocale" ) ; return ESecurityUIText . GUEST . getDisplayText ( aDisplayLocale ) ;
public class PowerOfTwoFileAllocator { /** * Internal method to remove from a subtree . * @ param x * the item to remove . * @ param t * the node that roots the tree . * @ return the new root . */ private Region remove ( Region x , Region t ) { } }
if ( t != NULL_NODE ) { // Step 1 : Search down the tree and set lastNode and deletedNode this . lastNode = t ; if ( x . orderRelativeTo ( t ) < 0 ) { t . left ( remove ( x , t . left ) ) ; } else { this . deletedNode = t ; t . right ( remove ( x , t . right ) ) ; } // Step 2 : If at the bottom of the tree and // x is ...
public class Segment { /** * Returns the coordinate of the point on this segment for the given * parameter value . */ public Point2D getCoord2D ( double t ) { } }
Point2D pt = new Point2D ( ) ; getCoord2D ( t , pt ) ; return pt ;
public class WebFragmentDescriptorImpl { /** * If not already created , a new < code > post - construct < / code > element will be created and returned . * Otherwise , the first existing < code > post - construct < / code > element will be returned . * @ return the instance defined for the element < code > post - c...
List < Node > nodeList = model . get ( "post-construct" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new LifecycleCallbackTypeImpl < WebFragmentDescriptor > ( this , "post-construct" , model , nodeList . get ( 0 ) ) ; } return createPostConstruct ( ) ;
public class CmsLoginUserAgreement { /** * Returns if the user agreement page should be shown for the current user . < p > * @ return < code > true < / code > if the user agreement page should be shown for the current user , otherwise < code > false < / code > */ public boolean isShowUserAgreement ( ) { } }
if ( ! getSettings ( ) . isUserAgreementAccepted ( ) && ( getConfigurationContent ( ) != null ) ) { CmsXmlContent content = getConfigurationContent ( ) ; boolean enabled = false ; try { // first read the property that contains the information if the agreement is enabled at all enabled = Boolean . valueOf ( getCms ( ) ....
public class ElementFilter { /** * Returns a set of types in { @ code elements } . * @ return a set of types in { @ code elements } * @ param elements the elements to filter */ public static Set < TypeElement > typesIn ( Set < ? extends Element > elements ) { } }
return setFilter ( elements , TYPE_KINDS , TypeElement . class ) ;
public class ApiApp { /** * Set the signer page secondary button hover color . * @ param color String hex color code * @ throws HelloSignException thrown if the color string is an invalid hex * string */ public void setSecondaryButtonHoverColor ( String color ) throws HelloSignException { } }
if ( white_labeling_options == null ) { white_labeling_options = new WhiteLabelingOptions ( ) ; } white_labeling_options . setSecondaryButtonHoverColor ( color ) ;
public class Controller { /** * get the original request raw data as json * @ return JSONObject * @ throws IOException */ public JSONObject getRawDataAsJson ( ) throws IOException { } }
String input = getRawDataAsString ( ) ; if ( input == null ) { return null ; } return new JSONObject ( input ) ;
public class BoundingBox { /** * give min rectangle */ public Rectangle getMinRectabgle ( ) { } }
return new Rectangle ( ( int ) xLB . min , ( int ) yLB . min , ( int ) ( xUB . min - xLB . min ) , ( int ) ( yUB . min - yLB . min ) ) ;
public class CommerceShippingMethodPersistenceImpl { /** * Clears the cache for all commerce shipping methods . * The { @ link EntityCache } and { @ link FinderCache } are both cleared by this method . */ @ Override public void clearCache ( ) { } }
entityCache . clearCache ( CommerceShippingMethodImpl . class ) ; finderCache . clearCache ( FINDER_CLASS_NAME_ENTITY ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITH_PAGINATION ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ) ;
public class ApiOvhEmailexchange { /** * Get this object properties * REST : GET / email / exchange / { organizationName } / service / { exchangeService } / protocol * @ param organizationName [ required ] The internal name of your exchange organization * @ param exchangeService [ required ] The internal name of ...
String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/protocol" ; StringBuilder sb = path ( qPath , organizationName , exchangeService ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhExchangeServiceProtocol . class ) ;
public class MarkowitzModel { /** * Will add a constraint on the sum of the asset weights specified by the asset indices . Either ( but not * both ) of the limits may be null . */ public LowerUpper addConstraint ( final BigDecimal lowerLimit , final BigDecimal upperLimit , final int ... assetIndeces ) { } }
return myConstraints . put ( assetIndeces , new LowerUpper ( lowerLimit , upperLimit ) ) ;
public class FessMessages { /** * Add the created action message for the key ' errors . crud _ failed _ to _ create _ crud _ table ' with parameters . * < pre > * message : Failed to create a new data . ( { 0 } ) * < / pre > * @ param property The property name for the message . ( NotNull ) * @ param arg0 The...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_crud_failed_to_create_crud_table , arg0 ) ) ; return this ;
public class ShrinkWrapPath { /** * { @ inheritDoc } * @ see java . nio . file . Path # toUri ( ) */ @ Override public URI toUri ( ) { } }
final URI root = ShrinkWrapFileSystems . getRootUri ( this . fileSystem . getArchive ( ) ) ; // Compose a new URI location , stripping out the extra " / " root final String location = root . toString ( ) + this . toString ( ) . substring ( 1 ) ; final URI uri = URI . create ( location ) ; return uri ;
public class StorageDescriptor { /** * A list specifying the sort order of each bucket in the table . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setSortColumns ( java . util . Collection ) } or { @ link # withSortColumns ( java . util . Collection ) } if...
if ( this . sortColumns == null ) { setSortColumns ( new java . util . ArrayList < Order > ( sortColumns . length ) ) ; } for ( Order ele : sortColumns ) { this . sortColumns . add ( ele ) ; } return this ;
public class TypeUtils { /** * < p > Retrieves all the type arguments for this parameterized type * including owner hierarchy arguments such as * { @ code Outer < K , V > . Inner < T > . DeepInner < E > } . * The arguments are returned in a * { @ link Map } specifying the argument type for each { @ link TypeVar...
return getTypeArguments ( type , getRawType ( type ) , null ) ;
public class WebAppConfiguratorHelper { /** * To configure JMS ConnectionFactory * @ param jmsConnFactories */ private void configureJMSConnectionFactories ( List < JMSConnectionFactory > jmsConnFactories ) { } }
Map < String , ConfigItem < JMSConnectionFactory > > jmsCfConfigItemMap = configurator . getConfigItemMap ( JNDIEnvironmentRefType . JMSConnectionFactory . getXMLElementName ( ) ) ; for ( JMSConnectionFactory jmsConnFactory : jmsConnFactories ) { String name = jmsConnFactory . getName ( ) ; if ( name == null ) { contin...
public class DatabaseFactory { /** * Build a mock tango db with a file containing the properties * @ param dbFile * @ param devices * @ param classes * @ throws DevFailed */ public static void setDbFile ( final File dbFile , final String [ ] devices , final String className ) throws DevFailed { } }
DatabaseFactory . useDb = false ; DatabaseFactory . fileDatabase = new FileTangoDB ( dbFile , Arrays . copyOf ( devices , devices . length ) , className ) ;
public class POIProxy { /** * This method is used to get the pois from a service and return a GeoJSON * document with the data retrieved given a bounding box corners * @ param id * The id of the service * @ param minX * @ param minY * @ param maxX * @ param maxY * @ return The GeoJSON response from the ...
DescribeService describeService = getDescribeServiceByID ( id ) ; POIProxyEvent beforeEvent = new POIProxyEvent ( POIProxyEventEnum . BeforeBrowseExtent , describeService , new Extent ( minX , minY , maxX , maxY ) , null , null , null , null , null , null , null , null , null ) ; notifyListenersBeforeRequest ( beforeEv...
public class MsgpackIOUtil { /** * Serializes the { @ code messages } into the generator using the given schema . */ public static < T > void writeListTo ( MessagePacker packer , List < T > messages , Schema < T > schema , boolean numeric ) throws IOException { } }
MsgpackGenerator generator = new MsgpackGenerator ( numeric ) ; MsgpackOutput output = new MsgpackOutput ( generator , schema ) ; for ( T m : messages ) { schema . writeTo ( output , m ) ; generator . writeTo ( packer ) ; generator . reset ( ) ; }
public class SheetBindingErrors { /** * 先頭のグローバルエラーを取得する 。 * @ return 存在しない場合は 、 空を返す 。 */ public Optional < ObjectError > getFirstGlobalError ( ) { } }
return errors . stream ( ) . filter ( e -> ! ( e instanceof FieldError ) ) . findFirst ( ) ;
public class RangeCondition { /** * { @ inheritDoc } */ @ Override public Query doQuery ( SingleColumnMapper < ? > mapper , Analyzer analyzer ) { } }
// Check doc values if ( docValues && ! mapper . docValues ) { throw new IndexException ( "Field '{}' does not support doc_values" , mapper . field ) ; } Class < ? > clazz = mapper . base ; Query query ; if ( clazz == String . class ) { String start = ( String ) mapper . base ( field , lower ) ; String stop = ( String ...
public class StrutsUtil { /** * Return a required property value * @ param msg MessageResources object * @ param pname name of the property * @ return String property value * @ throws Throwable on error */ public static String getReqProperty ( final MessageResources msg , final String pname ) throws Throwable {...
String p = getProperty ( msg , pname , null ) ; if ( p == null ) { logger . error ( "No definition for property " + pname ) ; throw new Exception ( ": No definition for property " + pname ) ; } return p ;
public class MqttConnection { /** * Returns client instance * @ param settings settings * @ return client instance * @ throws MqttException thrown when MQTT client construction fails */ private static synchronized IMqttClient getClient ( MqttSettings settings ) throws MqttException { } }
if ( CLIENT == null ) { CLIENT = new MqttClient ( settings . getServerUrl ( ) , PUBLISHER_ID ) ; MqttConnectOptions options = new MqttConnectOptions ( ) ; options . setAutomaticReconnect ( true ) ; options . setCleanSession ( true ) ; options . setConnectionTimeout ( 10 ) ; CLIENT . connect ( options ) ; } return CLIEN...
public class XPathImpl { /** * < p > Evaluate an < code > XPath < / code > expression in the specified context and return the result as the specified type . < / p > * < p > See " Evaluation of XPath Expressions " section of JAXP 1.3 spec * for context item evaluation , * variable , function and < code > QName < /...
if ( expression == null ) { String fmsg = XSLMessages . createXPATHMessage ( XPATHErrorResources . ER_ARG_CANNOT_BE_NULL , new Object [ ] { "XPath expression" } ) ; throw new NullPointerException ( fmsg ) ; } if ( returnType == null ) { String fmsg = XSLMessages . createXPATHMessage ( XPATHErrorResources . ER_ARG_CANNO...
public class HivePartitionVersionRetentionCleaner { /** * If simulate is set to true , this will simply return . * If version is pointing to an empty location , drop the partition and close the jdbc connection . * If version is pointing to the same location as of the dataset , then drop the partition and close the ...
Path versionLocation = ( ( HivePartitionRetentionVersion ) this . datasetVersion ) . getLocation ( ) ; Path datasetLocation = ( ( CleanableHivePartitionDataset ) this . cleanableDataset ) . getLocation ( ) ; String completeName = ( ( HivePartitionRetentionVersion ) this . datasetVersion ) . datasetURN ( ) ; State state...
public class ClassDefinitionFactory { /** * Generates a bean , and adds it to the composite class loader that * everything is using . */ public ClassDefinition generateDeclaredBean ( AbstractClassTypeDeclarationDescr typeDescr , TypeDeclaration type , PackageRegistry pkgRegistry , List < TypeDefinition > unresolvedTy...
ClassDefinition def = createClassDefinition ( typeDescr , type ) ; boolean success = true ; success &= wireAnnotationDefs ( typeDescr , type , def , pkgRegistry . getTypeResolver ( ) ) ; success &= wireEnumLiteralDefs ( typeDescr , type , def ) ; success &= wireFields ( typeDescr , type , def , pkgRegistry , unresolved...
public class ShapeRenderer { /** * Draw the the given shape filled in . Only the vertices are set . * The colour has to be set independently of this method . * @ param shape The shape to fill . * @ param callback The callback that will be invoked for each shape point */ private static final void fill ( Shape shap...
Triangulator tris = shape . getTriangles ( ) ; GL . glBegin ( SGL . GL_TRIANGLES ) ; for ( int i = 0 ; i < tris . getTriangleCount ( ) ; i ++ ) { for ( int p = 0 ; p < 3 ; p ++ ) { float [ ] pt = tris . getTrianglePoint ( i , p ) ; float [ ] np = callback . preRenderPoint ( shape , pt [ 0 ] , pt [ 1 ] ) ; if ( np == nu...
public class CompositeFileSystem { /** * { @ inheritDoc } */ public Entry get ( String path ) { } }
for ( FileSystem delegate : delegates ) { Entry entry = delegate . get ( path ) ; if ( entry == null ) { continue ; } if ( entry instanceof DirectoryEntry ) { return DefaultDirectoryEntry . equivalent ( this , ( DirectoryEntry ) entry ) ; } return entry ; } return null ;
public class AtlasClient { /** * Returns all type names in the system * @ return list of type names * @ throws AtlasServiceException */ public List < String > listTypes ( ) throws AtlasServiceException { } }
final JSONObject jsonObject = callAPIWithQueryParams ( API . LIST_TYPES , null ) ; return extractResults ( jsonObject , AtlasClient . RESULTS , new ExtractOperation < String , String > ( ) ) ;
public class ImplementationGuide { /** * syntactic sugar */ public ImplementationGuideContactComponent addContact ( ) { } }
ImplementationGuideContactComponent t = new ImplementationGuideContactComponent ( ) ; if ( this . contact == null ) this . contact = new ArrayList < ImplementationGuideContactComponent > ( ) ; this . contact . add ( t ) ; return t ;
public class HeapCompactDoublesSketch { /** * Heapifies the given srcMem , which must be a Memory image of a DoublesSketch and may have data . * @ param srcMem a Memory image of a sketch , which may be in compact or not compact form . * < a href = " { @ docRoot } / resources / dictionary . html # mem " > See Memory...
final long memCapBytes = srcMem . getCapacity ( ) ; if ( memCapBytes < Long . BYTES ) { throw new SketchesArgumentException ( "Source Memory too small: " + memCapBytes + " < 8" ) ; } final int preLongs = extractPreLongs ( srcMem ) ; final int serVer = extractSerVer ( srcMem ) ; final int familyID = extractFamilyID ( sr...
public class Encodings { /** * Load a list of all the supported encodings . * System property " encodings " formatted using URL syntax may define an * external encodings list . Thanks to Sergey Ushakov for the code * contribution ! * @ xsl . usage internal */ private static EncodingInfo [ ] loadEncodingInfo ( )...
try { InputStream is ; SecuritySupport ss = SecuritySupport . getInstance ( ) ; is = ss . getResourceAsStream ( ObjectFactory . findClassLoader ( ) , ENCODINGS_FILE ) ; // j2objc : if resource wasn ' t found , load defaults from string . if ( is == null ) { is = new ByteArrayInputStream ( ENCODINGS_FILE_STR . getBytes ...
public class CPAttachmentFileEntryPersistenceImpl { /** * Removes all the cp attachment file entries where classNameId = & # 63 ; and classPK = & # 63 ; and type = & # 63 ; and status = & # 63 ; from the database . * @ param classNameId the class name ID * @ param classPK the class pk * @ param type the type * ...
for ( CPAttachmentFileEntry cpAttachmentFileEntry : findByC_C_T_ST ( classNameId , classPK , type , status , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpAttachmentFileEntry ) ; }
public class RepeatInterval { /** * Add this field in the Record ' s field sequence . */ public BaseField setupField ( int iFieldSeq ) { } }
BaseField field = null ; // if ( iFieldSeq = = 0) // field = new CounterField ( this , ID , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ; // field . setHidden ( true ) ; // if ( iFieldSeq = = 1) // field = new RecordChangedField ( this , LAST _ CHANGED , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ; /...
public class Request { /** * Creates a new Request configured to retrieve an App User ID for the app ' s Facebook user . Callers * will send this ID back to their own servers , collect up a set to create a Facebook Custom Audience with , * and then use the resultant Custom Audience to target ads . * The GraphObje...
return newCustomAudienceThirdPartyIdRequest ( session , context , null , callback ) ;
public class ControlMessageFactoryImpl { /** * Create a new , empty ControlRequestAck Message * @ return The new ControlRequestAck * @ exception MessageCreateFailedException Thrown if such a message can not be created */ public final ControlRequestAck createNewControlRequestAck ( ) throws MessageCreateFailedExcepti...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createNewControlRequestAck" ) ; ControlRequestAck msg = null ; try { msg = new ControlRequestAckImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } catch ( MessageDecodeFailedException e ) { /* No need to FFDC this as JsMsgObject...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcPositiveLengthMeasure ( ) { } }
if ( ifcPositiveLengthMeasureEClass == null ) { ifcPositiveLengthMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 767 ) ; } return ifcPositiveLengthMeasureEClass ;
public class JSType { /** * Computes the restricted type of this type knowing that the * { @ code ToBoolean } predicate has a specific value . For more information * about the { @ code ToBoolean } predicate , see * { @ link # getPossibleToBooleanOutcomes } . * @ param outcome the value of the { @ code ToBoolean...
if ( outcome && areIdentical ( this , getNativeType ( JSTypeNative . UNKNOWN_TYPE ) ) ) { return getNativeType ( JSTypeNative . CHECKED_UNKNOWN_TYPE ) ; } BooleanLiteralSet literals = getPossibleToBooleanOutcomes ( ) ; if ( literals . contains ( outcome ) ) { return this ; } else { return getNativeType ( JSTypeNative ....
public class DocumentsRenderer { /** * Creates a simple content model to use in individual post navigations . * @ param document * @ return */ private Map < String , Object > getContentForNav ( Map < String , Object > document ) { } }
Map < String , Object > navDocument = new HashMap < > ( ) ; navDocument . put ( Attributes . NO_EXTENSION_URI , document . get ( Attributes . NO_EXTENSION_URI ) ) ; navDocument . put ( Attributes . URI , document . get ( Attributes . URI ) ) ; navDocument . put ( Attributes . TITLE , document . get ( Attributes . TITLE...
public class KeysAndAttributesMarshaller { /** * Marshall the given parameter object . */ public void marshall ( KeysAndAttributes keysAndAttributes , ProtocolMarshaller protocolMarshaller ) { } }
if ( keysAndAttributes == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( keysAndAttributes . getKeys ( ) , KEYS_BINDING ) ; protocolMarshaller . marshall ( keysAndAttributes . getAttributesToGet ( ) , ATTRIBUTESTOGET_BINDING ) ; protocolMar...
public class Form { /** * Returns for given parameter < i > _ name < / i > the instance of class * { @ link Form } . * @ param _ name name to search in the cache * @ return instance of class { @ link Form } * @ throws CacheReloadException on error */ public static Form get ( final String _name ) throws CacheRel...
return AbstractUserInterfaceObject . < Form > get ( _name , Form . class , CIAdminUserInterface . Form . getType ( ) ) ;
public class AuditCollectorUtil { /** * Make audit api rest call and parse response */ protected static JSONObject parseObject ( String url , AuditSettings settings ) { } }
LOGGER . info ( "NFRR Audit Collector Audit API Call" ) ; RestTemplate restTemplate = new RestTemplate ( ) ; JSONObject responseObj = null ; try { ResponseEntity < String > response = restTemplate . exchange ( url , HttpMethod . GET , getHeaders ( settings ) , String . class ) ; JSONParser jsonParser = new JSONParser (...
public class RecordConverter { /** * Convert a collection into a ` List < Writable > ` , i . e . a record that can be used with other datavec methods . * Uses a schema to decide what kind of writable to use . * @ return a record */ public static List < Writable > toRecord ( Schema schema , List < Object > source ) ...
final List < Writable > record = new ArrayList < > ( source . size ( ) ) ; final List < ColumnMetaData > columnMetaData = schema . getColumnMetaData ( ) ; if ( columnMetaData . size ( ) != source . size ( ) ) { throw new IllegalArgumentException ( "Schema and source list don't have the same length!" ) ; } for ( int i =...
public class AdditionalAnswers { /** * Returns an answer after a delay with a defined length . * @ param < T > return type * @ param sleepyTime the delay in milliseconds * @ param answer interface to the answer which provides the intended return value . * @ return the answer object to use * @ since 2.8.44 */ ...
return ( Answer < T > ) new AnswersWithDelay ( sleepyTime , ( Answer < Object > ) answer ) ;
public class WebhooksInner { /** * Creates a webhook for a container registry with the specified parameters . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param webhookName The name of the webho...
return createWithServiceResponseAsync ( resourceGroupName , registryName , webhookName , webhookCreateParameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class CreateMojo { /** * Formats the given argument using the configured format template and locale . * @ param arguments arguments to be formatted @ @ return formatted result */ private String format ( Object [ ] arguments ) { } }
Locale l = Locale . getDefault ( ) ; if ( locale != null ) { String [ ] parts = locale . split ( "_" , 3 ) ; if ( parts . length <= 1 ) { l = new Locale ( locale ) ; } else if ( parts . length == 2 ) { l = new Locale ( parts [ 0 ] , parts [ 1 ] ) ; } else { l = new Locale ( parts [ 0 ] , parts [ 1 ] , parts [ 2 ] ) ; }...
public class WebAppDescriptorImpl { /** * If not already created , a new < code > filter < / code > element will be created and returned . * Otherwise , the first existing < code > filter < / code > element will be returned . * @ return the instance defined for the element < code > filter < / code > */ public Filte...
List < Node > nodeList = model . get ( "filter" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new FilterTypeImpl < WebAppDescriptor > ( this , "filter" , model , nodeList . get ( 0 ) ) ; } return createFilter ( ) ;
public class ST_MakePoint { /** * Constructs POINT from two doubles . * @ param x X - coordinate * @ param y Y - coordinate * @ return The POINT constructed from the given coordinatesk * @ throws java . sql . SQLException */ public static Point createPoint ( double x , double y ) throws SQLException { } }
return createPoint ( x , y , Coordinate . NULL_ORDINATE ) ;
public class WSStartupRecoveryServiceImpl { /** * Look in the db for any partitions that this server executed with batch status of STARTING , STARTED , STOPPING * If we are starting up , and we already have jobs in on of the state above , * meaning those jobs did not finish when something happened to the server ( j...
String methodName = "recoverLocalPartitionsInInflightStates" ; try { List < RemotablePartitionEntity > remotablePartitions = persistenceManagerService . getPartitionsRunningLocalToServer ( psu ) ; for ( RemotablePartitionEntity partition : remotablePartitions ) { StepThreadExecutionEntity stepExecution = partition . ge...
public class AnnotationUtils { /** * Retrieve the < em > value < / em > of a named attribute , given an annotation instance . * @ param annotation the annotation instance from which to retrieve the value * @ param attributeName the name of the attribute value to retrieve * @ return the attribute value , or { @ co...
if ( annotation == null || ! StringUtils . hasLength ( attributeName ) ) { return null ; } try { Method method = annotation . annotationType ( ) . getDeclaredMethod ( attributeName ) ; ReflectionUtils . makeAccessible ( method ) ; return method . invoke ( annotation ) ; } catch ( Exception ex ) { return null ; }
public class FileScanner { /** * 开始搜索目录 . 当前搜索会停止之前的搜索 */ public void startSearch ( ) { } }
stopSearch ( ) ; stop = false ; MiscUtils . getExecutor ( ) . execute ( new Runnable ( ) { @ Override public void run ( ) { isSearching = true ; try { if ( finder != null ) { finder . start ( ) ; } for ( String aSrPath : srPath ) { getFile ( new File ( aSrPath ) ) ; } if ( ! stop && finder != null ) { finder . finished...
public class WalletManager { /** * Get all wallets * @ return * @ throws BitfinexClientException */ public Collection < BitfinexWallet > getWallets ( ) throws BitfinexClientException { } }
throwExceptionIfUnauthenticated ( ) ; synchronized ( walletTable ) { return Collections . unmodifiableCollection ( walletTable . values ( ) ) ; }
public class MPP8Reader { /** * There appear to be two ways of representing task notes in an MPP8 file . * This method tries to determine which has been used . * @ param task task * @ param data task data * @ param taskExtData extended task data * @ param taskVarData task var data */ private void setTaskNotes...
String notes = taskExtData . getString ( TASK_NOTES ) ; if ( notes == null && data . length == 366 ) { byte [ ] offsetData = taskVarData . getByteArray ( getOffset ( data , 362 ) ) ; if ( offsetData != null && offsetData . length >= 12 ) { notes = taskVarData . getString ( getOffset ( offsetData , 8 ) ) ; // We do pick...
public class UserInterfaceApi { /** * Open New Mail Window ( asynchronously ) Open the New Mail window , according * to settings from the request if applicable - - - SSO Scope : * esi - ui . open _ window . v1 * @ param datasource * The server name you would like data from ( optional , default to * tranquilit...
com . squareup . okhttp . Call call = postUiOpenwindowNewmailValidateBeforeCall ( datasource , token , uiNewMail , callback ) ; apiClient . executeAsync ( call , callback ) ; return call ;
public class PicoNetwork { /** * Called when unregistration is complete and the Connection can no * longer be interacted with . * Various error paths fall back to unregistering so it can happen multiple times and is really * annoying . Suppress it here with a flag */ void unregistered ( ) { } }
try { if ( ! m_alreadyStopped ) { try { safeStopping ( ) ; } finally { try { m_writeStream . shutdown ( ) ; } finally { m_readStream . shutdown ( ) ; } } } } finally { networkLog . debug ( "Closing channel " + m_threadName ) ; try { m_sc . close ( ) ; } catch ( IOException e ) { networkLog . warn ( e ) ; } }
public class MathBindings { /** * Binding for { @ link java . lang . Math # nextDown ( float ) } * @ param f starting floating - point value * @ return The adjacent floating - point value closer to negative * infinity . */ public static FloatBinding nextDown ( final ObservableFloatValue f ) { } }
return createFloatBinding ( ( ) -> Math . nextDown ( f . get ( ) ) , f ) ;
public class OWLDisjointUnionAxiomImpl_CustomFieldSerializer { /** * Deserializes the content of the object from the * { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } . * @ param streamReader the { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } to read ...
deserialize ( streamReader , instance ) ;
public class ActionMapping { /** * o routing path of forward e . g . / member / list / - > MemberListAction */ public NextJourney createNextJourney ( PlannedJourneyProvider journeyProvider , HtmlResponse response ) { } }
// almost copied from super String path = response . getRoutingPath ( ) ; final boolean redirectTo = response . isRedirectTo ( ) ; if ( path . indexOf ( ":" ) < 0 ) { if ( ! path . startsWith ( "/" ) ) { path = buildActionPath ( getActionDef ( ) . getComponentName ( ) ) + path ; } if ( ! redirectTo && isHtmlForward ( p...
public class Codec { /** * Initializes the { @ code Codec } with a dictionary that may contain specific codec * parameters and a previously created codec context . * @ param avDictionary dictionary with codec parameters . * @ param avContext codec context . * @ return zero on success , a negative value on error...
if ( avContext == null ) throw new JavaAVException ( "Could not open codec. Codec context is null." ) ; this . avContext = avContext ; return avcodec_open2 ( avContext , avCodec , avDictionary ) ;