signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Command { /** * Create a CORBA Any object and insert an long data in it . * @ param data The int data to be inserted into the Any object * @ exception DevFailed If the Any object creation failed . * Click < a href = " . . / . . / tango _ basic / idl _ html / Tango . html # DevFailed " > here < / a > ...
Any out_any = alloc_any ( ) ; out_any . insert_longlong ( data ) ; return out_any ;
public class IntBigArrays { /** * Sorts the specified range of elements according to the order induced by the specified * comparator using quicksort . * < p > The sorting algorithm is a tuned quicksort adapted from Jon L . Bentley and M . Douglas * McIlroy , & ldquo ; Engineering a Sort Function & rdquo ; , < i >...
final long len = to - from ; // Selection sort on smallest arrays if ( len < SMALL ) { selectionSort ( x , from , to , comp ) ; return ; } // Choose a partition element , v long m = from + len / 2 ; // Small arrays , middle element if ( len > SMALL ) { long l = from ; long n = to - 1 ; if ( len > MEDIUM ) { // Big arra...
public class CertDuplicator { /** * Create a self - signed certificate that duplicates as many of the given cert ' s fields as possible . * @ param cert Source certificate * @ return A self - signed X509Certificate certificate , not null */ static public X509Certificate duplicate ( X509Certificate cert ) { } }
// log . info ( " Duplicating cert = { } . " , cert ) ; X500Principal prince = cert . getSubjectX500Principal ( ) ; log . info ( "Principal={}." , prince . getName ( ) ) ; KeyPairGenerator kpg ; try { kpg = KeyPairGenerator . getInstance ( "RSA" ) ; } catch ( NoSuchAlgorithmException e1 ) { // TODO Auto - generated cat...
public class FunctionReturnDecoder { /** * Decode ABI encoded return values from smart contract function call . * @ param rawInput ABI encoded input * @ param outputParameters list of return types as { @ link TypeReference } * @ return { @ link List } of values returned by function , { @ link Collections # emptyL...
String input = Numeric . cleanHexPrefix ( rawInput ) ; if ( Strings . isEmpty ( input ) ) { return Collections . emptyList ( ) ; } else { return build ( input , outputParameters ) ; }
public class Num { /** * Convert < tt > Num < / tt > to defined custom object * @ param customObject * @ return */ public < T > T toObject ( Class < T > toClass , Class < ? extends NumConverter > converterClass ) { } }
return ( T ) toObject ( toClass , null , converterClass ) ;
public class AbstractTypeConvertingMap { /** * Obtains a date for the given parameter name and format * @ param name The name of the parameter * @ param formats The formats * @ return The date object or null if it cannot be parsed */ public Date date ( String name , Collection < String > formats ) { } }
return getDate ( name , formats ) ;
public class PropertyUtils { /** * Similar to { @ link PropertyUtils # getPropertyClass ( Class , List ) } but returns the property class . * @ param beanClass bean to be accessed * @ param field bean ' s fieldName * @ return bean ' s property class */ public static Type getPropertyType ( Class < ? > beanClass , ...
try { return INSTANCE . findPropertyType ( beanClass , field ) ; } catch ( NoSuchMethodException | IllegalAccessException | InvocationTargetException e ) { throw handleReflectionException ( beanClass , field , e ) ; }
public class WildcardImport { /** * Collect all on demand imports . */ private static ImmutableList < ImportTree > getWildcardImports ( List < ? extends ImportTree > imports ) { } }
ImmutableList . Builder < ImportTree > result = ImmutableList . builder ( ) ; for ( ImportTree tree : imports ) { // javac represents on - demand imports as a member select where the selected name is ' * ' . Tree ident = tree . getQualifiedIdentifier ( ) ; if ( ! ( ident instanceof MemberSelectTree ) ) { continue ; } M...
public class LazyObject { /** * Returns the JSON array stored in this object for the given key . * @ param key the name of the field on this object * @ return an array value * @ throws LazyException if the value for the given key was not an array . */ public LazyArray getJSONArray ( String key ) throws LazyExcept...
LazyNode token = getFieldToken ( key ) ; if ( token . type != LazyNode . ARRAY ) throw new LazyException ( "Requested value is not an array" , token ) ; LazyArray arr = new LazyArray ( token ) ; arr . parent = this ; return arr ;
public class MoreCollectors { /** * Returns a { @ code Collector } which finds the index of the maximal stream * element according to the specified { @ link Comparator } . If there are * several maximal elements , the index of the first one is returned . * @ param < T > the type of the input elements * @ param ...
return minIndex ( comparator . reversed ( ) ) ;
public class DescribeRaidArraysRequest { /** * An array of RAID array IDs . If you use this parameter , < code > DescribeRaidArrays < / code > returns descriptions of * the specified arrays . Otherwise , it returns a description of every array . * @ return An array of RAID array IDs . If you use this parameter , < ...
if ( raidArrayIds == null ) { raidArrayIds = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return raidArrayIds ;
public class Validator { /** * Performs all data validation that is appicable to the data value itself * @ param object - the data value * @ throws DataValidationException if any of the data constraints are violated */ @ SuppressWarnings ( "unchecked" ) public void postValidate ( Object object ) throws DataValidati...
if ( _values != null || _ranges != null ) { if ( _values != null ) for ( Object value : _values ) { if ( value . equals ( object ) ) return ; } if ( _ranges != null ) for ( @ SuppressWarnings ( "rawtypes" ) Range r : _ranges ) { @ SuppressWarnings ( "rawtypes" ) Comparable o = ( Comparable ) object ; if ( r . inclusive...
public class HeaderFooterRecyclerAdapter { /** * Notifies that multiple content items are removed . * @ param positionStart the position . * @ param itemCount the item count . */ public final void notifyContentItemRangeRemoved ( int positionStart , int itemCount ) { } }
if ( positionStart < 0 || itemCount < 0 || positionStart + itemCount > contentItemCount ) { throw new IndexOutOfBoundsException ( "The given range [" + positionStart + " - " + ( positionStart + itemCount - 1 ) + "] is not within the position bounds for content items [0 - " + ( contentItemCount - 1 ) + "]." ) ; } notify...
public class ModuleEntries { /** * Delete an Entry . * @ param entry Entry ID * @ return Integer representing the success ( 204 ) of the action * @ throws IllegalArgumentException if spaceId is null . * @ throws IllegalArgumentException if environmentId is null . * @ throws IllegalArgumentException if entryId...
assertNotNull ( entry . getSpaceId ( ) , "spaceId" ) ; assertNotNull ( entry . getEnvironmentId ( ) , "environmentId" ) ; assertNotNull ( entry . getId ( ) , "entryId" ) ; return service . delete ( entry . getSpaceId ( ) , entry . getEnvironmentId ( ) , entry . getId ( ) ) . blockingFirst ( ) . code ( ) ;
public class SmartsFragmentExtractor { /** * Generate a SMARTS for the substructure formed of the provided * atoms . * @ param atomIdxs atom indexes * @ return SMARTS , null if an empty array is passed */ public String generate ( int [ ] atomIdxs ) { } }
if ( atomIdxs == null ) throw new NullPointerException ( "No atom indexes provided" ) ; if ( atomIdxs . length == 0 ) return null ; // makes sense ? // special case if ( atomIdxs . length == 1 && mode == MODE_EXACT ) return aexpr [ atomIdxs [ 0 ] ] ; // initialize traversal information Arrays . fill ( rbnds , 0 ) ; Arr...
public class Params { /** * Return a new parameters object . * @ param name the name of the parameters * @ param params the actual parameters * @ param < T > the parameter type * @ throws NullPointerException if one of the parameters is { @ code null } * @ return a new parameters object */ public static < T >...
return new Params < > ( name , params ) ;
public class Query { /** * Begin this { @ link Query } with all { @ link WindupVertexFrame } instances of the given type . */ public static QueryBuilderFind fromType ( Class < ? extends WindupVertexFrame > type ) { } }
final Query query = new Query ( ) ; // this query is going to be added after evaluate ( ) method , because in some cases we need gremlin and in some // frames query . searchType = type ; return query ;
public class dnszone { /** * Use this API to fetch all the dnszone resources that are configured on netscaler . */ public static dnszone [ ] get ( nitro_service service ) throws Exception { } }
dnszone obj = new dnszone ( ) ; dnszone [ ] response = ( dnszone [ ] ) obj . get_resources ( service ) ; return response ;
public class Tree { /** * Get the first matched child with the given value from all of the sub - tree * @ param value * @ return */ public Optional < Tree < T > > deepChild ( T value ) { } }
return breadthFirstTraversal ( ) . filter ( rx ( its ( Tree :: getValue , isEquals ( value ) ) ) ) . map ( Optional :: of ) . blockingFirst ( Optional . empty ( ) ) ;
public class CachedDirectoryLookupService { /** * Dump the ServiceCache to CacheDumpLogger Logger . * @ return * true if dump complete . * @ throws Exception */ private boolean dumpCache ( ) throws Exception { } }
if ( CacheDumpLogger . isDebugEnabled ( ) ) { List < ModelService > services = getCache ( ) . getAllServicesWithInstance ( ) ; if ( dumper == null ) { dumper = new JsonSerializer ( ) ; } StringBuilder sb = new StringBuilder ( ) ; sb . append ( "LookupManager dump Service Cache at: " ) . append ( System . currentTimeMil...
public class MetadataUtil { /** * Checks for the first parent node occurrence of the a w3c parentEnum element . * @ param parentElement * the element from which the search starts . * @ param parentEnum * the < code > XsdElementEnum < / code > specifying the parent element . * @ return true , if found , otherw...
Node parent = parentElement . getParentNode ( ) ; while ( parent != null ) { if ( parent . getNodeType ( ) == Node . ELEMENT_NODE ) { final Element parentElm = ( Element ) parent ; if ( parentEnum . isTagNameEqual ( parentElm . getTagName ( ) ) ) { return true ; } } parent = parent . getParentNode ( ) ; } return false ...
public class MapperComplex { /** * Creates an object from a value map . * This does some special handling to take advantage of us using the value map so it avoids creating * a bunch of array objects and collections . Things you have to worry about when writing a * high - speed JSON serializer . * @ param cls th...
T newInstance = Reflection . newInstance ( cls ) ; ValueMap map = ( ValueMap ) ( Map ) valueMap ; Map < String , FieldAccess > fields = fieldsAccessor . getFields ( cls ) ; Map . Entry < String , Object > [ ] entries ; FieldAccess field = null ; String fieldName = null ; Map . Entry < String , Object > entry ; int size...
public class druidGLexer { /** * $ ANTLR start " RIGHT _ JOIN " */ public final void mRIGHT_JOIN ( ) throws RecognitionException { } }
try { int _type = RIGHT_JOIN ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 655:13 : ( ( ' RIGHT _ JOIN ' | ' right _ join ' ) ) // druidG . g : 655:15 : ( ' RIGHT _ JOIN ' | ' right _ join ' ) { // druidG . g : 655:15 : ( ' RIGHT _ JOIN ' | ' right _ join ' ) int alt36 = 2 ; int LA36_0 = input . LA ( 1 ) ; i...
public class SchemaBuilder { /** * Shortcut for { @ link # dropIndex ( CqlIdentifier , CqlIdentifier ) } * dropIndex ( CqlIdentifier . fromCql ( keyspace ) , CqlIdentifier . fromCql ( indexName ) } . */ @ NonNull public static Drop dropIndex ( @ Nullable String keyspace , @ NonNull String indexName ) { } }
return dropIndex ( keyspace == null ? null : CqlIdentifier . fromCql ( keyspace ) , CqlIdentifier . fromCql ( indexName ) ) ;
public class EventSubscriptionsInner { /** * List all event subscriptions for a specific domain topic . * List all event subscriptions that have been created for a specific domain topic . * @ param resourceGroupName The name of the resource group within the user ' s subscription . * @ param domainName Name of the...
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( domainN...
public class ClassUtils { /** * Gets a Field object representing the named field on the specified class . This method will recursively search * up the class hierarchy of the specified class until the Object class is reached . If the named field is found * then a Field object representing the class field is returned...
try { return type . getDeclaredField ( fieldName ) ; } catch ( NoSuchFieldException cause ) { if ( type . getSuperclass ( ) != null ) { return getField ( type . getSuperclass ( ) , fieldName ) ; } throw new FieldNotFoundException ( cause ) ; }
public class ReceiveQueueBuffer { /** * This method is called by the batches after they have finished retrieving the messages . */ void reportBatchFinished ( ReceiveMessageBatchTask batch ) { } }
synchronized ( finishedTasks ) { finishedTasks . addLast ( batch ) ; if ( log . isTraceEnabled ( ) ) { log . info ( "Queue " + qUrl + " now has " + finishedTasks . size ( ) + " receive results cached " ) ; } } synchronized ( taskSpawnSyncPoint ) { -- inflightReceiveMessageBatches ; } satisfyFuturesFromBuffer ( ) ; spaw...
public class AuditSigningImpl { /** * The < code > decrypt < / code > operation takes a UTF - 8 encoded String in the form of a byte [ ] . * The byte [ ] is generated from String . getBytes ( " UTF - 8 " ) . * A decrypted byte [ ] is returned . * @ param byte [ ] data to decrypt * @ param java . security . Key ...
if ( data == null ) { Tr . error ( tc , "security.audit.decryption.data.error" ) ; throw new AuditDecryptionException ( "Invalid data passed into the decryption algorithm." ) ; } if ( sharedKey == null ) { Tr . error ( tc , "security.audit.invalid.shared.key.error" ) ; throw new AuditDecryptionException ( "An invalid s...
public class AwtExtensions { /** * Gets the toplevel < code > Frame < / code > or < code > Dialog < / code > * @ param component * the parent component * @ return the the toplevel < code > Frame < / code > or < code > Dialog < / code > * @ throws HeadlessException * if < code > GraphicsEnvironment . isHeadles...
if ( component == null ) { return JOptionPane . getRootFrame ( ) ; } if ( component instanceof Frame || component instanceof Dialog ) { return ( Window ) component ; } return getWindowForComponent ( component . getParent ( ) ) ;
public class SarlBehaviorImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case SarlPackage . SARL_BEHAVIOR__EXTENDS : return extends_ != null ; } return super . eIsSet ( featureID ) ;
public class ResultQueueEntry { /** * < p > fromThrowable . < / p > * @ param throwable a { @ link java . lang . Throwable } object . * @ param < T > a T object . * @ return a { @ link com . google . cloud . bigtable . grpc . scanner . ResultQueueEntry } object . */ public static < T > ResultQueueEntry < T > from...
Preconditions . checkArgument ( throwable != null , "Throwable may not be null" ) ; return new ExceptionResultQueueEntry < T > ( throwable ) ;
public class Version { /** * Sets a new version number . * @ param index available version number index . * @ param number version number ( not negative ) . * @ param label version number label ( optional ) . * @ return version descriptor . * @ throws IllegalArgumentException if either index or number are ill...
validateNumber ( number ) ; if ( isBeyondBounds ( index ) ) { String message = String . format ( "illegal number index: %d" , index ) ; throw new IllegalArgumentException ( message ) ; } labels . set ( -- index , label ) ; numbers . set ( index , number ) ; return this ;
public class ProtoClient { /** * Generic protocol buffer based HTTP request . Not intended for general consumption , but public * for advance use cases . * @ param builder The appropriate Builder for the object received from the request . * @ param method The HTTP method ( e . g . GET ) for this request . * @ p...
HashMap < String , String > headers = new HashMap < > ( ) ; headers . put ( "Content-Type" , MEDIA_TYPE ) ; headers . put ( "Accept" , MEDIA_TYPE ) ; String [ ] localVarAuthNames = new String [ ] { "BearerToken" } ; Request request = apiClient . buildRequest ( path , method , new ArrayList < Pair > ( ) , new ArrayList ...
public class KerasModelBuilder { /** * Provide training configuration as file input stream from YAML * @ param trainingYamlInputStream Input stream of training YAML string * @ return Model builder */ public KerasModelBuilder trainingYamlInputStream ( InputStream trainingYamlInputStream ) throws IOException { } }
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream ( ) ; IOUtils . copy ( trainingYamlInputStream , byteArrayOutputStream ) ; this . trainingYaml = new String ( byteArrayOutputStream . toByteArray ( ) ) ; return this ;
public class AdditionalRequestHeadersInterceptor { /** * Adds the additional header values to the HTTP request . * @ param theRequest the HTTP request */ @ Override public void interceptRequest ( IHttpRequest theRequest ) { } }
for ( Map . Entry < String , List < String > > header : additionalHttpHeaders . entrySet ( ) ) { for ( String headerValue : header . getValue ( ) ) { if ( headerValue != null ) { theRequest . addHeader ( header . getKey ( ) , headerValue ) ; } } }
public class JsHdrsImpl { /** * Set the Guaranteed Delivery Remote Get Start Tick value in the message . * Javadoc description supplied by JsMessage interface . */ public final void setGuaranteedRemoteGetStartTick ( long value ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setGuaranteedRemoteGetStartTick" , Long . valueOf ( value ) ) ; getHdr2 ( ) . setLongField ( JsHdr2Access . GUARANTEEDREMOTEGET_SET_STARTTICK , value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryE...
public class SystemInputJson { /** * Returns the SystemInputDef represented by the given JSON object . */ public static SystemInputDef asSystemInputDef ( JsonObject json ) { } }
String systemName = json . getString ( SYSTEM_KEY ) ; try { SystemInputDef systemInputDef = new SystemInputDef ( validIdentifier ( systemName ) ) ; // Get system annotations Optional . ofNullable ( json . getJsonObject ( HAS_KEY ) ) . ifPresent ( has -> has . keySet ( ) . stream ( ) . forEach ( key -> systemInputDef . ...
public class EasyGeneralFeatureDetector { /** * Reshape derivative images to match the input image */ private void initializeDerivatives ( T input ) { } }
// reshape derivatives if the input image has changed size if ( detector . getRequiresGradient ( ) || detector . getRequiresHessian ( ) ) { derivX . reshape ( input . width , input . height ) ; derivY . reshape ( input . width , input . height ) ; } if ( detector . getRequiresHessian ( ) ) { derivXX . reshape ( input ....
public class FormLayout { /** * Creates and returns a deep copy of the given array . Unlike { @ code # clone } that performs a * shallow copy , this method copies both array levels . * @ param array the array to clone * @ return a deep copy of the given array * @ see Object # clone ( ) */ private static int [ ]...
int [ ] [ ] result = new int [ array . length ] [ ] ; for ( int i = 0 ; i < result . length ; i ++ ) { result [ i ] = array [ i ] . clone ( ) ; } return result ;
public class NettyUtils { /** * This method will first read an unsigned short to find the length of the * string and then read the actual string based on the length . This method * will also reset the reader index to end of the string * @ param buffer * The Netty buffer containing at least one unsigned short ...
String readString = null ; if ( null != buffer && buffer . readableBytes ( ) > 2 ) { int length = buffer . readUnsignedShort ( ) ; readString = readString ( buffer , length , charset ) ; } return readString ;
public class DeleteVpnConnectionRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional * parameters to enable operation dry - run . */ @ Override public Request < DeleteVpnConnectionRequest > getDryRunRequest ( ) { } }
Request < DeleteVpnConnectionRequest > request = new DeleteVpnConnectionRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
public class JKDefaultTableModel { /** * Returns the column name . * @ param column the column * @ return a name for this column using the string value of the appropriate * member in < code > columnIdentifiers < / code > . If * < code > columnIdentifiers < / code > does not have an entry for this index , * re...
Object id = null ; // This test is to cover the case when // getColumnCount has been subclassed by mistake . . . if ( column < this . columnIdentifiers . size ( ) && column >= 0 ) { id = this . columnIdentifiers . elementAt ( column ) ; } return id == null ? super . getColumnName ( column ) : id . toString ( ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcLine ( ) { } }
if ( ifcLineEClass == null ) { ifcLineEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 350 ) ; } return ifcLineEClass ;
public class InternalSimpleAntlrParser { /** * $ ANTLR start synpred20 _ InternalSimpleAntlr */ public final void synpred20_InternalSimpleAntlr_fragment ( ) throws RecognitionException { } }
EObject this_Parenthesized_4 = null ; // InternalSimpleAntlr . g : 813:2 : ( this _ Parenthesized _ 4 = ruleParenthesized ) // InternalSimpleAntlr . g : 813:2 : this _ Parenthesized _ 4 = ruleParenthesized { if ( state . backtracking == 0 ) { } pushFollow ( FOLLOW_2 ) ; this_Parenthesized_4 = ruleParenthesized ( ) ; st...
public class StringEntityRepository { /** * Find for the column associated with the given name . * @ param name column name . * @ return return the column if exits , otherwise returns null . */ protected Column getColumn ( String name ) { } }
for ( Column column : getColumns ( ) ) { if ( column . getColumnName ( ) . equals ( name ) ) { return column ; } } return null ;
public class AggregationIterator { /** * Returns whether or not there are more values to aggregate . * @ param update _ pos Whether or not to also move the internal pointer * { @ link # pos } to the index of the next value to aggregate . * @ return true if there are more values to aggregate , false otherwise . */...
final int size = iterators . length ; for ( int i = pos + 1 ; i < size ; i ++ ) { if ( timestamps [ i ] != 0 ) { // LOG . debug ( " hasNextValue - > true # " + i ) ; if ( update_pos ) { pos = i ; } return true ; } } // LOG . debug ( " hasNextValue - > false ( ran out ) " ) ; return false ;
public class FormTool { /** * Constructs a button input element with the specified parameter name , * the specified button text , and the specified extra text . */ public String button ( String name , String text , String extra ) { } }
return fixedInput ( "button" , name , text , extra ) ;
public class AllureFileUtils { /** * Unmarshal test suite from given file . */ public static TestSuiteResult unmarshal ( File testSuite ) throws IOException { } }
try ( InputStream stream = new FileInputStream ( testSuite ) ) { return unmarshal ( stream ) ; }
public class LifecycleHooks { /** * Invoke an intercepted method through its callable proxy . * < b > NOTE < / b > : If the invoked method throws an exception , this method re - throws the original exception . * @ param proxy callable proxy for the intercepted method * @ return { @ code anything } - value returne...
try { return proxy . call ( ) ; } catch ( InvocationTargetException e ) { throw UncheckedThrow . throwUnchecked ( e . getCause ( ) ) ; }
public class Vector4d { /** * / * ( non - Javadoc ) * @ see org . joml . Vector4dc # mul ( double , org . joml . Vector4d ) */ public Vector4d mul ( double scalar , Vector4d dest ) { } }
dest . x = x * scalar ; dest . y = y * scalar ; dest . z = z * scalar ; dest . w = w * scalar ; return dest ;
public class ProjectProperties { /** * Sets the Calendar used . ' Standard ' if no value is set . * @ param calendarName Calendar name */ public void setDefaultCalendarName ( String calendarName ) { } }
if ( calendarName == null || calendarName . length ( ) == 0 ) { calendarName = DEFAULT_CALENDAR_NAME ; } set ( ProjectField . DEFAULT_CALENDAR_NAME , calendarName ) ;
public class OidcCommonClientRequest { /** * do not overridden */ public void errorCommon ( String [ ] msgCodes , Object [ ] objects ) { } }
int msgIndex = 0 ; if ( ! TYPE_ID_TOKEN . equals ( this . getTokenType ( ) ) ) { msgIndex = 1 ; } if ( ! bInboundSupported ) { Tr . error ( tcCommon , msgCodes [ msgIndex ] , objects ) ; }
public class BundleProcessor { /** * Process the Jawr Servlets * @ param destDirPath * the destination directory path * @ param jawrServletDefinitions * the destination directory * @ throws Exception * if an exception occurs . */ protected void processJawrServlets ( String destDirPath , List < ServletDefini...
String appRootDir = "" ; String jsServletMapping = "" ; String cssServletMapping = "" ; String binaryServletMapping = "" ; for ( Iterator < ServletDefinition > iterator = jawrServletDefinitions . iterator ( ) ; iterator . hasNext ( ) ; ) { ServletDefinition servletDef = ( ServletDefinition ) iterator . next ( ) ; Servl...
public class PropertyConverter { /** * Get the JCR property name for an RDF predicate * @ param namespaceRegistry the namespace registry * @ param predicate the predicate to map to a property name * @ param namespaceMapping the namespace mapping * @ return JCR property name for an RDF predicate * @ throws Rep...
// reject if update request contains any fcr namespaces if ( namespaceMapping != null && namespaceMapping . containsKey ( "fcr" ) ) { throw new FedoraInvalidNamespaceException ( "Invalid fcr namespace properties " + predicate + "." ) ; } final String rdfNamespace = predicate . getNameSpace ( ) ; // log warning if the u...
public class ClassUseMapper { /** * Map the AnnotationType to the ProgramElementDocs that use them as * type parameters . * @ param map the map the insert the information into . * @ param doc the doc whose type parameters are being checked . * @ param holder the holder that owns the type parameters . */ private...
AnnotationDesc [ ] annotations ; boolean isPackage = false ; if ( doc instanceof ProgramElementDoc ) { annotations = ( ( ProgramElementDoc ) doc ) . annotations ( ) ; } else if ( doc instanceof PackageDoc ) { annotations = ( ( PackageDoc ) doc ) . annotations ( ) ; isPackage = true ; } else if ( doc instanceof Paramete...
public class VMath { /** * Returns an orthonormalization of this matrix . * @ param m1 Input matrix * @ return the orthonormalized matrix */ public static double [ ] [ ] orthonormalize ( final double [ ] [ ] m1 ) { } }
final int columndimension = getColumnDimensionality ( m1 ) ; final double [ ] [ ] v = copy ( m1 ) ; // FIXME : optimize - excess copying ! for ( int i = 1 ; i < columndimension ; i ++ ) { final double [ ] u_i = getCol ( m1 , i ) ; final double [ ] sum = new double [ m1 . length ] ; for ( int j = 0 ; j < i ; j ++ ) { fi...
public class XYCurve { /** * Add a coordinate pair , but don ' t simplify * @ param x X coordinate * @ param y Y coordinate */ public void add ( double x , double y ) { } }
data . add ( x ) ; data . add ( y ) ; minx = Math . min ( minx , x ) ; maxx = Math . max ( maxx , x ) ; miny = Math . min ( miny , y ) ; maxy = Math . max ( maxy , y ) ;
public class JavaSmsApi { /** * 取账户信息 * @ return json格式字符串 */ public static Single < String > getUserInfo ( String apikey ) { } }
Map < String , String > params = new HashMap < > ( ) ; params . put ( "apikey" , apikey ) ; return post ( URI_GET_USER_INFO , params ) ;
public class AdManagerAxisHeaderHandler { /** * Creates a SOAP header . * @ param adsServiceDescriptor the ads service descriptor * @ return the instantiated SOAP header * @ throws ClassNotFoundException if the SOAP header class could not be found * @ throws IllegalAccessException if the SOAP header class could...
return Class . forName ( adsServiceDescriptor . getInterfaceClass ( ) . getPackage ( ) . getName ( ) + ".SoapRequestHeader" ) . newInstance ( ) ;
public class TomcatService { /** * Creates a new { @ link TomcatService } with the web application at the specified document base directory * inside the JAR / WAR / directory where the specified class is located at . */ public static TomcatService forClassPath ( Class < ? > clazz , String docBase ) { } }
return TomcatServiceBuilder . forClassPath ( clazz , docBase ) . build ( ) ;
public class MPPUtility { /** * Writes a large byte array to a file . * @ param fileName output file name * @ param data target data */ public static final void fileDump ( String fileName , byte [ ] data ) { } }
System . out . println ( "FILE DUMP" ) ; try { FileOutputStream os = new FileOutputStream ( fileName ) ; os . write ( data ) ; os . close ( ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; }
public class XmlRpcDataMarshaller { /** * Transforms the Vector of the Repository parameters into a Repository Object . < br > * Structure of the parameters : < br > * Vector [ name , Vector [ project parameters ] , type , content type , uri ] * @ param xmlRpcParameters Vector [ name , Vector [ project parameters...
Repository repository = null ; if ( ! xmlRpcParameters . isEmpty ( ) ) { repository = Repository . newInstance ( ( String ) xmlRpcParameters . get ( REPOSITORY_UID_IDX ) ) ; repository . setName ( ( String ) xmlRpcParameters . get ( REPOSITORY_NAME_IDX ) ) ; repository . setProject ( toProject ( ( Vector ) xmlRpcParame...
public class DescribeProvisioningArtifactResult { /** * The URL of the CloudFormation template in Amazon S3. * @ param info * The URL of the CloudFormation template in Amazon S3. * @ return Returns a reference to this object so that method calls can be chained together . */ public DescribeProvisioningArtifactResu...
setInfo ( info ) ; return this ;
public class TypeMappings { /** * Get the WIM input property that maps to the UserRegistry input property . * @ param inputVirtualRealm Virtual realm to find the mappings . * @ param inputProperty String representing the input UserRegistry property . * @ return String representing the input WIM property . * @ p...
String methodName = "getInputMapping" ; // initialize the return value String returnValue = null ; RealmConfig realmConfig = mappingUtils . getCoreConfiguration ( ) . getRealmConfig ( inputVirtualRealm ) ; if ( realmConfig != null ) { try { returnValue = realmConfig . getURMapInputPropertyInRealm ( inputProperty ) ; if...
public class ProfilerTimerFilter { /** * Profile a MessageReceived event . This method will gather the following * informations : * - the method duration * - the shortest execution time * - the slowest execution time * - the average execution time * - the global number of calls * @ param nextFilter The fi...
if ( profileMessageReceived ) { long start = timeNow ( ) ; nextFilter . messageReceived ( session , message ) ; long end = timeNow ( ) ; messageReceivedTimerWorker . addNewDuration ( end - start ) ; } else { nextFilter . messageReceived ( session , message ) ; }
public class AbstractStore { /** * ( non - Javadoc ) * @ see com . arakelian . dao . Dao # getAll ( java . lang . String [ ] ) */ @ Override public List < T > getAll ( final String ... ids ) { } }
if ( ids == null || ids . length == 0 ) { return Collections . < T > emptyList ( ) ; } // delegate to internal method that partitions the list into smaller groups and aggregates // the result return getAll ( Lists . newArrayList ( ids ) ) ;
public class IntStreamEx { /** * Returns a sequential { @ code IntStreamEx } containing the results of * applying the given function to the corresponding pairs of values in given * two arrays . * @ param first the first array * @ param second the second array * @ param mapper a non - interfering , stateless f...
return of ( new RangeBasedSpliterator . ZipInt ( 0 , checkLength ( first . length , second . length ) , mapper , first , second ) ) ;
public class ItemAndSupport { /** * Returns a negative integer , zero , or a positive integer * as this object ' s support is less than , equal to , or * greater than the specified object ' s support . */ public int compareTo ( ItemAndSupport other ) { } }
if ( other . support == this . support ) { return this . item - other . item ; } else { return other . support - this . support ; }
public class SignatureUtil { /** * 生成sign HMAC - SHA256 或 MD5 签名 * @ param map map * @ param paternerKey paternerKey * @ return sign */ public static String generateSign ( Map < String , String > map , String paternerKey ) { } }
return generateSign ( map , null , paternerKey ) ;
public class DeviceImpl { /** * Remove a command * @ param command * @ throws DevFailed */ public synchronized void removeCommand ( final CommandImpl command ) throws DevFailed { } }
if ( ! command . getName ( ) . equalsIgnoreCase ( INIT_CMD ) ) { pollingManager . removeCommandPolling ( command . getName ( ) ) ; commandList . remove ( command ) ; }
public class HostStorageSystem { /** * Attach one or more SCSI LUNs . This is an asynchronous , batch operation of attachScisLun . * @ param lunUuid each element specifies UUID of LUN to be attached . * @ return Task * @ throws HostConfigFault * @ throws RuntimeFault * @ throws RemoteException * @ see # att...
ManagedObjectReference taskMor = getVimService ( ) . attachScsiLunEx_Task ( getMOR ( ) , lunUuid ) ; return new Task ( getServerConnection ( ) , taskMor ) ;
public class PatternCriteria { /** * To sql pattern . * @ param attribute the attribute * @ return the string */ private String toSQLPattern ( String attribute ) { } }
String pattern = attribute . replace ( "*" , "%" ) ; if ( ! pattern . startsWith ( "%" ) ) { pattern = "%" + pattern ; } if ( ! pattern . endsWith ( "%" ) ) { pattern = pattern . concat ( "%" ) ; } return pattern ;
public class ApiTokenStore { /** * Same as { @ link # regenerateTokenFromLegacy ( Secret ) } but only applied if there is an existing legacy token . * Otherwise , no effect . */ public synchronized void regenerateTokenFromLegacyIfRequired ( @ Nonnull Secret newLegacyApiToken ) { } }
if ( tokenList . stream ( ) . noneMatch ( HashedToken :: isLegacy ) ) { deleteAllLegacyAndGenerateNewOne ( newLegacyApiToken , true ) ; }
public class FastDOC { /** * Performs a single run of FastDOC , finding a single cluster . * @ param database Database context * @ param relation used to get actual values for DBIDs . * @ param S The set of points we ' re working on . * @ param d Dimensionality of the data set we ' re currently working on . *...
// Relevant attributes of highest cardinality . long [ ] D = null ; // The seed point for the best dimensions . DBIDVar dV = DBIDUtil . newVar ( ) ; // Inform the user about the progress in the current iteration . FiniteProgress iprogress = LOG . isVerbose ( ) ? new FiniteProgress ( "Iteration progress for current clus...
public class FileSystem { /** * Reads first line in the file specified by { @ code path } . * @ param path Path to read . * @ return First line from the file . * @ throws FileNotFoundException File cannot be found . * @ throws IOException Error reading the file . */ public static String readFirstLine ( String p...
try ( FileInputStream fis = new FileInputStream ( path ) ) { try ( InputStreamReader isr = new InputStreamReader ( fis ) ) { try ( BufferedReader br = new BufferedReader ( isr ) ) { return br . readLine ( ) ; } } }
public class ProgressBar { /** * Wraps a { @ link Stream } so that when iterated , a progress bar is shown to track the traversal progress . * For this function the progress bar can be fully customized by using a { @ link ProgressBarBuilder } . * @ param stream Underlying stream ( can be sequential or parallel ) ...
Spliterator < T > sp = wrap ( stream . spliterator ( ) , pbb ) ; return StreamSupport . stream ( sp , stream . isParallel ( ) ) ;
public class Session { /** * Executes SQL query , which returns list of entities . * @ param < T > Entity type . * @ param query SQL query string . * @ param entityClass Entity class . * @ param params Parameters , which will be placed instead of ' ? ' signs . * @ return List of result entities . * @ throws...
Cursor < T > cursor = getCursor ( query , entityClass , params ) ; return cursor . fetchList ( ) ;
public class JNDIProjectStageDetector { /** * Performs a JNDI lookup to obtain the current project stage . The method use the standard JNDI name for the JSF project * stage for the lookup * @ return name bound to JNDI or < code > null < / code > */ private String getProjectStageNameFromJNDI ( ) { } }
try { InitialContext context = new InitialContext ( ) ; Object obj = context . lookup ( ProjectStage . PROJECT_STAGE_JNDI_NAME ) ; if ( obj != null ) { return obj . toString ( ) . trim ( ) ; } } catch ( NamingException e ) { // ignore } return null ;
public class TableMeta { /** * カラムのメタデータを追加します 。 * @ param columnMeta カラム記述 */ public void addColumnMeta ( ColumnMeta columnMeta ) { } }
columnMetas . add ( columnMeta ) ; columnMeta . setTableMeta ( this ) ; if ( columnMeta . isPrimaryKey ( ) ) { primaryKeyColumnMetas . add ( columnMeta ) ; }
public class AlertService { /** * Remove Alert policies * @ param policyRefs policy references * @ return OperationFuture wrapper for list of AlertPolicy */ public OperationFuture < List < AlertPolicy > > delete ( AlertPolicy ... policyRefs ) { } }
List < AlertPolicy > policiesList = Arrays . asList ( policyRefs ) ; List < JobFuture > jobs = policiesList . stream ( ) . map ( ref -> delete ( ref ) . jobFuture ( ) ) . collect ( toList ( ) ) ; return new OperationFuture < > ( policiesList , new ParallelJobsFuture ( jobs ) ) ;
public class Parser { /** * 11.5 Multiplicative Expression */ private ParseTree parseMultiplicativeExpression ( ) { } }
SourcePosition start = getTreeStartLocation ( ) ; ParseTree left = parseExponentiationExpression ( ) ; while ( peekMultiplicativeOperator ( ) ) { Token operator = nextToken ( ) ; ParseTree right = parseExponentiationExpression ( ) ; left = new BinaryOperatorTree ( getTreeLocation ( start ) , left , operator , right ) ;...
public class InverseDepsAnalyzer { /** * Prepend end point to the path */ private Stream < Deque < Archive > > makePaths ( Deque < Archive > path ) { } }
Set < Archive > nodes = endPoints . get ( path . peekFirst ( ) ) ; if ( nodes == null || nodes . isEmpty ( ) ) { return Stream . of ( new LinkedList < > ( path ) ) ; } else { return nodes . stream ( ) . map ( n -> { Deque < Archive > newPath = new LinkedList < > ( ) ; newPath . addFirst ( n ) ; newPath . addAll ( path ...
public class ThreadLocalProxyCopyOnWriteArrayList { /** * Appends the specified element to the end of this list . * @ param e element to be appended to this list * @ return < tt > true < / tt > ( as specified by { @ link Collection # add } ) */ @ Override public boolean add ( E e ) { } }
final ReentrantLock lock = this . lock ; lock . lock ( ) ; try { Object [ ] elements = getArray ( ) ; int len = elements . length ; Object [ ] newElements = Arrays . copyOf ( elements , len + 1 ) ; newElements [ len ] = e ; setArray ( newElements ) ; return true ; } finally { lock . unlock ( ) ; }
public class X509CRLImpl { /** * Verifies that this CRL was signed using the * private key that corresponds to the given public key , * and that the signature verification was computed by * the given provider . * @ param key the PublicKey used to carry out the verification . * @ param sigProvider the name of ...
if ( sigProvider == null ) { sigProvider = "" ; } if ( ( verifiedPublicKey != null ) && verifiedPublicKey . equals ( key ) ) { // this CRL has already been successfully verified using // this public key . Make sure providers match , too . if ( sigProvider . equals ( verifiedProvider ) ) { return ; } } if ( signedCRL ==...
public class PipelineApi { /** * Modifies a pipeline schedule for project . * < pre > < code > PUT / projects / : id / pipeline _ schedules / : pipeline _ schedule _ id < / code > < / pre > * @ param projectIdOrPath projectIdOrPath the project in the form of an Integer ( ID ) , String ( path ) , or Project instance...
GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "description" , pipelineSchedule . getDescription ( ) , false ) . withParam ( "ref" , pipelineSchedule . getRef ( ) , false ) . withParam ( "cron" , pipelineSchedule . getCron ( ) , false ) . withParam ( "cron_timezone" , pipelineSchedule . getCronTimezone ( ...
public class PropertiesLoader { /** * Load properties from resource , with handling of the inclusion . < br > * 从指定的资源中载入properties , 处理包含关系 。 * @ param namelocation of the properties file , which can ends with & quot ; . * & quot ; . < br > * properties文件的位置 , 可以以 & quot ; . * & quot ; 结尾 。 * @ param includePr...
return load ( name , includePropertyName , null ) ;
public class OGCGeometry { /** * Create an OGCGeometry instance from the GeometryCursor . * @ param gc * @ param sr * @ return Geometry instance created from the geometry cursor . */ public static OGCGeometry createFromEsriCursor ( GeometryCursor gc , SpatialReference sr ) { } }
return createFromEsriCursor ( gc , sr , false ) ;
public class MetricCollectorSupport { /** * Returns true if the collector is successfully created and started ; * false otherwise . */ private static boolean createAndStartCollector ( CloudWatchMetricConfig config ) { } }
MetricCollectorSupport collector = new MetricCollectorSupport ( config ) ; if ( collector . start ( ) ) { singleton = collector ; return true ; } return false ;
public class Generics { /** * Maps type parameters in a type to their values . * @ param toMapType * Type possibly containing type arguments * @ param typeAndParams * must be either ParameterizedType , or ( in case there are no * type arguments , or it ' s a raw type ) Class * @ return toMapType , but with ...
if ( isMissingTypeParameters ( typeAndParams ) ) { return erase ( toMapType ) ; } else { VarMap varMap = new VarMap ( ) ; Type handlingTypeAndParams = typeAndParams ; while ( handlingTypeAndParams instanceof ParameterizedType ) { ParameterizedType pType = ( ParameterizedType ) handlingTypeAndParams ; Class < ? > clazz ...
public class SpanOfWeekdays { /** * / * [ deutsch ] * < p > Ermittelt die Anzahl der Tage , die zu dieser Wochentagsspanne geh & ouml ; ren . < / p > * @ return count of days in range { @ code 1-7} */ public int length ( ) { } }
int days = 1 ; Weekday current = this . start ; while ( current != this . end ) { days ++ ; current = current . next ( ) ; } return days ;
public class StringUtil { /** * splits this string around matches of the given separator . * @ param str strings * @ param separator separator * @ param trim include the last separator * @ return the array of strings computed by splitting this string around matches of the given separator */ public static String...
if ( str == null ) { return null ; } char sep = separator . charAt ( 0 ) ; ArrayList < String > strList = new ArrayList < String > ( ) ; StringBuilder split = new StringBuilder ( ) ; int index = 0 ; while ( ( index = StringUtils . findNext ( str , sep , StringUtils . ESCAPE_CHAR , index , split ) ) >= 0 ) { ++ index ; ...
public class WxApi2Impl { /** * 微信支付公共POST方法 ( 不带证书 ) * @ param url * 请求路径 * @ param key * 商户KEY * @ param params * 参数 * @ return */ @ Override public NutMap postPay ( String url , String key , Map < String , Object > params ) { } }
params . remove ( "sign" ) ; String sign = WxPaySign . createSign ( key , params ) ; params . put ( "sign" , sign ) ; Request req = Request . create ( url , METHOD . POST ) ; req . setData ( Xmls . mapToXml ( params ) ) ; Response resp = Sender . create ( req ) . send ( ) ; if ( ! resp . isOK ( ) ) throw new IllegalSta...
public class ReferenceCompositeGroupService { /** * Find EntityIdentifiers for entities whose name matches the query string according to the * specified method and is of the specified type */ @ Override public EntityIdentifier [ ] searchForEntities ( String query , IGroupConstants . SearchMethod method , Class type )...
Set allIds = new HashSet ( ) ; for ( Iterator services = getComponentServices ( ) . values ( ) . iterator ( ) ; services . hasNext ( ) ; ) { IIndividualGroupService service = ( IIndividualGroupService ) services . next ( ) ; EntityIdentifier [ ] ids = service . searchForEntities ( query , method , type ) ; for ( int i ...
public class SpiderService { /** * Validate the table option " sharding - field " . */ private void validateTableOptionShardingField ( TableDefinition tableDef , String optValue ) { } }
// Verify that the sharding - field exists and is a timestamp field . FieldDefinition shardingFieldDef = tableDef . getFieldDef ( optValue ) ; Utils . require ( shardingFieldDef != null , "Sharding field has not been defined: " + optValue ) ; assert shardingFieldDef != null ; // Make FindBugs happy Utils . require ( sh...
public class StringMapTransform { /** * Transform an object * in to another object * @ param input the record to transform * @ return the transformed writable */ @ Override public Object map ( Object input ) { } }
String orig = input . toString ( ) ; if ( map . containsKey ( orig ) ) { return map . get ( orig ) ; } if ( input instanceof String ) return input ; else return orig ;
public class FieldTable { /** * Move all the fields to the output buffer . * @ exception Exception File exception . */ public void fieldsToData ( Rec record ) throws DBException { } }
this . setupNewDataSource ( ) ; int fieldCount = record . getFieldCount ( ) ; // Number of fields to write out for ( int iFieldSeq = Constants . MAIN_FIELD ; iFieldSeq < fieldCount + Constants . MAIN_FIELD ; iFieldSeq ++ ) { Field field = record . getField ( iFieldSeq ) ; if ( field . isVirtual ( ) ) // x | | ( ! field...
public class NumberCodeGenerator { /** * Adds a method to return the symbol or display name for a currency . */ private void addCurrencyInfoMethod ( TypeSpec . Builder type , String name , Map < String , String > mapping ) { } }
MethodSpec . Builder method = MethodSpec . methodBuilder ( name ) . addModifiers ( PUBLIC ) . addParameter ( Types . CLDR_CURRENCY_ENUM , "code" ) . returns ( String . class ) ; method . beginControlFlow ( "if (code == null)" ) ; method . addStatement ( "return $S" , "" ) ; method . endControlFlow ( ) ; method . beginC...
public class ListDatastoresRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListDatastoresRequest listDatastoresRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listDatastoresRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listDatastoresRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listDatastoresRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ;...
public class ConceptDrawProjectReader { /** * Read an exception day for a calendar . * @ param mpxjCalendar ProjectCalendar instance * @ param day ConceptDraw PROJECT exception day */ private void readExceptionDay ( ProjectCalendar mpxjCalendar , ExceptedDay day ) { } }
ProjectCalendarException mpxjException = mpxjCalendar . addCalendarException ( day . getDate ( ) , day . getDate ( ) ) ; if ( day . isIsDayWorking ( ) ) { for ( Document . Calendars . Calendar . ExceptedDays . ExceptedDay . TimePeriods . TimePeriod period : day . getTimePeriods ( ) . getTimePeriod ( ) ) { mpxjException...
public class OpportunitiesApi { /** * Get opportunities task ( asynchronously ) Return information of an * opportunities task - - - This route expires daily at 11:05 * @ param taskId * ID of an opportunities task ( required ) * @ param datasource * The server name you would like data from ( optional , default...
com . squareup . okhttp . Call call = getOpportunitiesTasksTaskIdValidateBeforeCall ( taskId , datasource , ifNoneMatch , callback ) ; Type localVarReturnType = new TypeToken < OpportunitiesTasksResponse > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnType , callback ) ; return call ;